Improve command output from nothing
This commit is contained in:
parent
4060e449a1
commit
929b36be52
1 changed files with 9 additions and 1 deletions
|
@ -48,6 +48,14 @@ class SecurityCheck extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
return $this->securityChecker->check(base_path() . '/composer.lock');
|
||||
$alerts = $this->securityChecker->check(base_path() . '/composer.lock');
|
||||
if (count($alerts) === 0) {
|
||||
$this->info('No security vulnerabilities found.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
$this->error('vulnerabilities found');
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue