Skip to content

Commit 599f674

Browse files
authored
Fix ScheduleRunCommandTest on Windows by using 'cmd /c exit 0' instead of 'true' (laravel#57621)
1 parent cb804c4 commit 599f674

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Integration/Console/Scheduling/ScheduleRunCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ public function test_command_with_no_explicit_return_does_not_trigger_event()
132132

133133
// Create a schedule and add the command that just performs an action without explicit exit
134134
$schedule = $this->app->make(Schedule::class);
135-
$task = $schedule->exec('true')
135+
$command = PHP_OS_FAMILY === 'Windows' ? 'cmd /c exit 0' : 'true';
136+
$task = $schedule->exec($command)
136137
->everyMinute();
137138

138139
// Make sure it will run regardless of schedule

0 commit comments

Comments
 (0)