Skip to content

Commit dd5d3df

Browse files
author
Moritz Fain
committed
Adjusted runLocally to throw ProcessFailedException in case of error
1 parent 9cd3ef9 commit dd5d3df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\Console\Question\ConfirmationQuestion;
2121
use Symfony\Component\Console\Question\Question;
2222
use Symfony\Component\Finder\Finder;
23+
use Symfony\Component\Process\Exception\ProcessFailedException;
2324
use Symfony\Component\Process\Process;
2425
use Deployer\Cluster\ClusterFactory;
2526
use Symfony\Component\Console\Input\InputArgument;
@@ -353,7 +354,7 @@ function runLocally($command, $timeout = 60)
353354
});
354355

355356
if (!$process->isSuccessful()) {
356-
throw new \RuntimeException($process->getErrorOutput());
357+
throw new ProcessFailedException($process);
357358
}
358359

359360
$output = $process->getOutput();

0 commit comments

Comments
 (0)