Skip to content

Commit

Permalink
Do not break composer run on error
Browse files Browse the repository at this point in the history
This fixes #4 and just outputs an error message instead of
failing the whole composer command.
  • Loading branch information
sebastianfeldmann committed May 1, 2020
1 parent 097b03f commit c01f4f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ComposerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private function runCaptainCommand(string $command): void
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
$executable = str_replace(' ', '\\ ', $this->executable);

// sub process settings
// sub process settings
$cmd = $executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;
$pipes = [];
$spec = [
Expand All @@ -202,7 +202,7 @@ private function runCaptainCommand(string $command): void
$exitCode = $status['exitcode'] ?? -1;
proc_close($process);
if ($exitCode !== 0) {
throw new RuntimeException($this->pluginErrorMessage('invalid-exit-code'));
$this->io->writeError($this->pluginErrorMessage('installation process failed'));
}
}

Expand Down

0 comments on commit c01f4f0

Please sign in to comment.