File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ protected function formatTask($event)
7575 ];
7676 }
7777
78+ if (PHP_OS_FAMILY === 'Windows ' && Str::contains ($ event ->command , '"artisan" ' )) {
79+ $ exploded = explode (' ' , $ event ->command );
80+
81+ return [
82+ 'type ' => 'artisan ' ,
83+ 'name ' => 'artisan ' .implode (' ' , array_slice ($ exploded , 2 )),
84+ ];
85+ }
86+
7887 return [
7988 'type ' => 'command ' ,
8089 'name ' => $ event ->command ,
@@ -95,6 +104,10 @@ public function runTask($id)
95104 /** @var \Illuminate\Console\Scheduling\Event $event */
96105 $ event = $ this ->getKernelEvents ()[$ id - 1 ];
97106
107+ if (PHP_OS_FAMILY === 'Windows ' ) {
108+ $ event ->command = Str::of ($ event ->command )->replace ('php-cgi.exe ' , 'php.exe ' );
109+ }
110+
98111 $ event ->sendOutputTo ($ this ->getOutputTo ());
99112
100113 $ event ->run (app ());
You can’t perform that action at this time.
0 commit comments