Skip to content

Commit 2b3c305

Browse files
committed
Simplify fix
1 parent a6d4f6f commit 2b3c305

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Process/SkipLintProcess.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ class SkipLintProcess extends PhpProcess
2222
*/
2323
public function __construct(PhpExecutable $phpExecutable, array $filesToCheck)
2424
{
25-
$scriptPath = __DIR__ . '/../../bin/skip-linting.php';
25+
$scriptPath = dirname(dirname(__DIR__)) . '/bin/skip-linting.php';
26+
$code = sprintf("include('%s');", $scriptPath);
2627

27-
if (!is_file($scriptPath)) {
28-
throw new RuntimeException("skip-linting.php script not found in '$scriptPath'.");
29-
}
30-
31-
$parameters = array('-d', 'display_errors=stderr', '-f', realpath($scriptPath));
28+
$parameters = array('-d', 'display_errors=stderr', '-r', $code);
3229
parent::__construct($phpExecutable, $parameters, implode(PHP_EOL, $filesToCheck));
3330
}
3431

0 commit comments

Comments
 (0)