Skip to content

Commit fbe4e03

Browse files
committed
Ease debugging BaselineNeonErrorFormatterIntegrationTest
1 parent b5fc9ec commit fbe4e03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/PHPStan/Command/ErrorFormatter/BaselineNeonErrorFormatterIntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ private function runPhpStan(
6969
throw new ShouldNotHappenException();
7070
}
7171
chdir(__DIR__ . '/../../../..');
72-
exec(sprintf('%s %s clear-result-cache %s', escapeshellarg(PHP_BINARY), 'bin/phpstan', $configFile !== null ? '--configuration ' . escapeshellarg($configFile) : ''), $clearResultCacheOutputLines, $clearResultCacheExitCode);
72+
exec(sprintf('%s %s clear-result-cache %s', escapeshellarg(PHP_BINARY), 'bin/phpstan', $configFile !== null ? '--configuration ' . escapeshellarg($configFile) : '') . ' 2>&1', $clearResultCacheOutputLines, $clearResultCacheExitCode);
7373
if ($clearResultCacheExitCode !== 0) {
74-
throw new ShouldNotHappenException('Could not clear result cache.');
74+
throw new ShouldNotHappenException('Could not clear result cache:' . "\n" . implode("\n", $clearResultCacheOutputLines));
7575
}
7676

7777
exec(sprintf('%s %s analyse --no-progress --error-format=%s --level=7 %s %s%s', escapeshellarg(PHP_BINARY), 'bin/phpstan', $errorFormatter, $configFile !== null ? '--configuration ' . escapeshellarg($configFile) : '', escapeshellarg($analysedPath), $baselineFile !== null ? ' --generate-baseline ' . escapeshellarg($baselineFile) : ''), $outputLines);

0 commit comments

Comments
 (0)