Skip to content

Commit 1492904

Browse files
author
Ivan Gavryshko
committed
MAGETWO-38917: Process composer generated messages
- changes according to CR
1 parent 4c9cd7c commit 1492904

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/MagentoComposerApplication.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function runUpdateDryRun($packages, $workingDir = null)
147147
);
148148
} catch (\RuntimeException $e) {
149149
$errorMessage = $this->generateAdditionalErrorMessage($e->getMessage(), $packages, $workingDir);
150-
throw new \RuntimeException($errorMessage . PHP_EOL . $e->getMessage());
150+
throw new \RuntimeException($errorMessage . PHP_EOL . $e->getMessage(), $e->getCode(), $e);
151151
}
152152

153153
return $output;
@@ -198,11 +198,11 @@ protected function generateAdditionalErrorMessage($message, $inputPackages, $wor
198198
$versions = $this->getPackageVersions($output);
199199

200200
$conflicts[] = ' - ' . $package . ' version ' . $version
201-
. ' please try to upgrade it too, available package versions: ' . implode(', ', $versions);
201+
. ' please try to upgrade it to one of the following package versions: ' . implode(', ', $versions);
202202
}
203203

204-
$errorMessage = 'You are trying to update package '
205-
. implode(' and ', $update) . PHP_EOL
204+
$errorMessage = 'You are trying to update package(s) '
205+
. implode(', ', $update) . PHP_EOL
206206
. 'But looks like it conflicts with the following packages:' . PHP_EOL
207207
. implode(PHP_EOL, $conflicts)
208208
. PHP_EOL;

0 commit comments

Comments
 (0)