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)
75
75
];
76
76
}
77
77
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
+
78
87
return [
79
88
'type ' => 'command ' ,
80
89
'name ' => $ event ->command ,
@@ -95,6 +104,10 @@ public function runTask($id)
95
104
/** @var \Illuminate\Console\Scheduling\Event $event */
96
105
$ event = $ this ->getKernelEvents ()[$ id - 1 ];
97
106
107
+ if (PHP_OS_FAMILY === 'Windows ' ) {
108
+ $ event ->command = Str::of ($ event ->command )->replace ('php-cgi.exe ' , 'php.exe ' );
109
+ }
110
+
98
111
$ event ->sendOutputTo ($ this ->getOutputTo ());
99
112
100
113
$ event ->run (app ());
You can’t perform that action at this time.
0 commit comments