Skip to content

Commit

Permalink
feat: check empty error output
Browse files Browse the repository at this point in the history
  • Loading branch information
hungthai1401 committed Dec 7, 2023
1 parent 55c88d3 commit 2d9f95b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Recorders/Vulnerable.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ public function record(SharedBeat $event): void
}

$result = Process::run(command: 'composer audit -f json --locked');
if ($result->failed()) {

/**
* @link https://github.com/composer/composer/issues/7323
*/
if ($result->failed() && '' !== $result->errorOutput()) {
throw new RuntimeException(message: 'Composer audit failed: '.$result->errorOutput());
}

Expand Down

0 comments on commit 2d9f95b

Please sign in to comment.