Skip to content

Commit

Permalink
Return command exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloKowalczyk committed Jun 16, 2022
1 parent 838bd16 commit be98f29
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion composer-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@

$command = \trim("composer update -o {$defaultComposerFlags} {$preferLowest}");
echo $command, PHP_EOL;
echo \shell_exec($command);

$output = [];
$exitCode = 0;
\exec(
$command,
$output,
$exitCode
);
foreach ($output as $line) {
echo $line, PHP_EOL;
}

return $exitCode;

0 comments on commit be98f29

Please sign in to comment.