Skip to content

Commit a474a4e

Browse files
committed
fix test on windows
1 parent de9316b commit a474a4e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/Pest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ function runWithStdin($stdinContent, $arguments)
9595
$tempFile = tempnam(sys_get_temp_dir(), 'pint_test_stdin_');
9696
file_put_contents($tempFile, $stdinContent);
9797

98-
$pintExecutable = file_exists('./pint') ? './pint' : 'vendor/bin/pint';
98+
$isWindows = DIRECTORY_SEPARATOR === '\\';
9999

100-
$command = [$pintExecutable];
100+
if ($isWindows) {
101+
$command = [PHP_BINARY, 'pint'];
102+
} else {
103+
$command = ['./pint'];
104+
}
101105

102106
if (isset($arguments['path'])) {
103107
$paths = is_array($arguments['path']) ? $arguments['path'] : [$arguments['path']];

0 commit comments

Comments
 (0)