Skip to content

Commit

Permalink
Use Process.mustRun
Browse files Browse the repository at this point in the history
  • Loading branch information
marmichalski committed Dec 17, 2023
1 parent 976d61b commit 51b8ab5
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ private function createAdvisoriesDatabaseRepo(): void
*/
private function executeCommandInRepoDir(array $command): void
{
$process = new Process($command, $this->repoDir);
$process->run();
if (!$process->isSuccessful()) {
throw new \RuntimeException(sprintf('Command \'%s\' failed with exit code %d%s', $process->getCommandLine(), $process->getExitCode(), PHP_EOL.$process->getOutput()));
}
(new Process($command, $this->repoDir))->mustRun();
}

private function synchronizeAdvisoriesDatabase(): void
Expand Down

0 comments on commit 51b8ab5

Please sign in to comment.