Skip to content

Commit a6f73d8

Browse files
committed
Merge pull request #3 from magento-ogre/PR_Branch
[Ogres] Bug Fixes The related CE PR was merged by another gatekeeper but is not available today, so merging this to keep the repos in sync
2 parents ac0891c + 653e1ca commit a6f73d8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/InfoCommand.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)