Skip to content

Commit c01f4f0

Browse files
Do not break composer run on error
This fixes #4 and just outputs an error message instead of failing the whole composer command.
1 parent 097b03f commit c01f4f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ComposerPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private function runCaptainCommand(string $command): void
177177
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
178178
$executable = str_replace(' ', '\\ ', $this->executable);
179179

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

0 commit comments

Comments
 (0)