Commit 1db343fe authored by Jorge Sá Pereira's avatar Jorge Sá Pereira Committed by Jorge Sá Pereira
Browse files

[FIX] Fix issue in script to exit when composer update fails

parent 0258a7c3
Pipeline #578517398 passed with stages
in 8 minutes and 45 seconds
......@@ -32,7 +32,14 @@ if (! file_exists($composerLock)) {
$initial_md5 = md5_file($composerLock);
printf('Getting md5 from %s ...' . PHP_EOL . 'result: %s' . PHP_EOL, $composerLock, $initial_md5);
printf('Running composer update...' . PHP_EOL);
exec(sprintf('%s %s update --prefer-dist --working-dir=%s --no-progress --no-interaction', PHP_BINARY, $composerBin, $vendorBundledPath));
$output = null;
$exitCode = 0;
exec(sprintf('%s %s update --prefer-dist --working-dir=%s --no-progress --no-interaction', PHP_BINARY, $composerBin, $vendorBundledPath), $output, $exitCode);
if ($exitCode !== 0) {
echo PHP_EOL . "Error: Failed to upgrade composer dependencies. Aborting." . PHP_EOL . PHP_EOL;
$final_md5 = md5_file($composerLock);
printf('Getting md5 from %s after composer update...' . PHP_EOL . 'result: %s' . PHP_EOL, $composerLock, $final_md5);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment