Skip to content

Commit a4ae226

Browse files
committed
Use PHP_BINARY and base_path in test process
Replaces hardcoded 'php' with PHP_BINARY and sets the working directory to base_path() when running the test listing process. This improves compatibility with different PHP environments and ensures the process runs in the correct directory.
1 parent 3c76361 commit a4ae226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Console/InstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected function determineTestEnforcement(bool $ask = true): bool
204204
$hasMinimumTests = false;
205205

206206
if (file_exists(base_path('vendor/bin/phpunit'))) {
207-
$process = new Process(['php', 'artisan', 'test', '--list-tests']);
207+
$process = new Process([PHP_BINARY, 'artisan', 'test', '--list-tests'], base_path());
208208
$process->run();
209209

210210
/** Count the number of tests - they'll always have :: between the filename and test name */

0 commit comments

Comments
 (0)