Skip to content

Commit df9fa6e

Browse files
committed
Only change exit code with --fail-without-result-cache when the error formatter returns 0
1 parent 7107c62 commit df9fa6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Command/AnalyseCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
485485
}
486486

487487
$exitCode = $errorFormatter->formatErrors($analysisResult, $inceptionResult->getStdOutput());
488-
if ($failWithoutResultCache && !$analysisResult->isResultCacheUsed()) {
488+
if ($exitCode === 0 && $failWithoutResultCache && !$analysisResult->isResultCacheUsed()) {
489489
$exitCode = 2;
490490
}
491491

0 commit comments

Comments
 (0)