Skip to content

Commit e727cfc

Browse files
committed
New is_windows_os helper added.
1 parent cf10b3b commit e727cfc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/classes/Artisan/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function runInBackground()
3131

3232
protected function composeForRunInBackground()
3333
{
34-
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
34+
if (is_windows_os()) {
3535
return "start /B {$this->composeForRun()}";
3636
}
3737

src/system.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
if (!function_exists('is_windows_os')) {
4+
function is_windows_os()
5+
{
6+
return (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
7+
}
8+
}

0 commit comments

Comments
 (0)