File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ class InfoCommand
2323 */
2424 const AVAILABLE_VERSIONS = 'available_versions ' ;
2525
26+ /**
27+ * Package name
28+ */
29+ const NAME = 'name ' ;
30+
2631 /**
2732 * New versions
2833 */
@@ -61,15 +66,14 @@ public function run($package, $installed = false)
6166 '--all ' => $ showAllPackages ,
6267 ];
6368
64- $ result = [];
65-
6669 try {
6770 $ output = $ this ->magentoComposerApplication ->runComposerCommand ($ commandParameters );
6871 } catch (\RuntimeException $ e ) {
6972 return false ;
7073 }
7174
7275 $ rawLines = explode ("\n" , str_replace ("\r\n" , "\n" , $ output ));
76+ $ result = [];
7377
7478 foreach ($ rawLines as $ line ) {
7579 $ chunk = explode (': ' , $ line );
@@ -80,6 +84,10 @@ public function run($package, $installed = false)
8084
8185 $ result = $ this ->extractVersions ($ result );
8286
87+ if (!isset ($ result [self ::NAME ]) && isset ($ result [self ::CURRENT_VERSION ])) {
88+ $ result [self ::NAME ] = $ package ;
89+ }
90+
8391 return $ result ;
8492 }
8593
You can’t perform that action at this time.
0 commit comments