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
23
23
*/
24
24
const AVAILABLE_VERSIONS = 'available_versions ' ;
25
25
26
+ /**
27
+ * Package name
28
+ */
29
+ const NAME = 'name ' ;
30
+
26
31
/**
27
32
* New versions
28
33
*/
@@ -61,15 +66,14 @@ public function run($package, $installed = false)
61
66
'--all ' => $ showAllPackages ,
62
67
];
63
68
64
- $ result = [];
65
-
66
69
try {
67
70
$ output = $ this ->magentoComposerApplication ->runComposerCommand ($ commandParameters );
68
71
} catch (\RuntimeException $ e ) {
69
72
return false ;
70
73
}
71
74
72
75
$ rawLines = explode ("\n" , str_replace ("\r\n" , "\n" , $ output ));
76
+ $ result = [];
73
77
74
78
foreach ($ rawLines as $ line ) {
75
79
$ chunk = explode (': ' , $ line );
@@ -80,6 +84,10 @@ public function run($package, $installed = false)
80
84
81
85
$ result = $ this ->extractVersions ($ result );
82
86
87
+ if (!isset ($ result [self ::NAME ]) && isset ($ result [self ::CURRENT_VERSION ])) {
88
+ $ result [self ::NAME ] = $ package ;
89
+ }
90
+
83
91
return $ result ;
84
92
}
85
93
You can’t perform that action at this time.
0 commit comments