Skip to content

Commit 976857d

Browse files
committed
Do not hide errors for SkipLint process
1 parent 6871424 commit 976857d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Diff for: bin/skip-linting.php

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@
1919

2020
echo $file . ';' . ($skip ? '1' : '0') . PHP_EOL;
2121
}
22-

Diff for: src/ParallelLint.php

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public function lint(array $files)
134134
if (!empty($waiting)) {
135135
$skipLintProcess->waitForFinish();
136136

137+
if ($skipLintProcess->getErrorOutput()) {
138+
throw new \Exception("Error in skip-linting.php process\nError output: {$skipLintProcess->getErrorOutput()}");
139+
}
140+
137141
foreach ($waiting as $file => $process) {
138142
$skipStatus = $skipLintProcess->isSkipped($file);
139143
if ($skipStatus === null) {

Diff for: src/Process/SkipLintProcess.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(PhpExecutable $phpExecutable, array $filesToCheck)
3030

3131
$script = str_replace('<?php', '', $script);
3232

33-
$parameters = array('-n', '-r ' . escapeshellarg($script));
33+
$parameters = array('-d display_errors=stderr', '-n', '-r ' . escapeshellarg($script));
3434

3535
parent::__construct($phpExecutable, $parameters, implode(PHP_EOL, $filesToCheck));
3636
}

0 commit comments

Comments
 (0)