Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Composer/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class Installer
public const ERROR_LOCK_FILE_INVALID = 4;
// used/declared in SolverProblemsException, carried over here for completeness
public const ERROR_DEPENDENCY_RESOLUTION_FAILED = 2;
public const ERROR_AUDIT_FAILED = 5;

/**
* @var IOInterface
Expand Down Expand Up @@ -400,7 +401,8 @@ public function run(): int
foreach ($this->repositoryManager->getRepositories() as $repo) {
$repoSet->addRepository($repo);
}
$auditor->audit($this->io, $repoSet, $packages, $this->auditFormat);

return $auditor->audit($this->io, $repoSet, $packages, $this->auditFormat) > 0 ? self::ERROR_AUDIT_FAILED : 0;
} catch (TransportException $e) {
$this->io->error('Failed to audit '.$target.' packages.');
if ($this->io->isVerbose()) {
Expand Down