Skip to content

Commit

Permalink
[5.1] Fixing scheduler switch user with withoutOverlapping together n…
Browse files Browse the repository at this point in the history
…ot working (#13412)

* Fixing scheduler switch user with withoutOverlapping together not working

* exclude switching user for windows
  • Loading branch information
pulkitjalan authored and taylorotwell committed May 4, 2016
1 parent 46fd7dd commit 6c9edd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Scheduling/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function buildCommand()
$command = $this->command.$redirect.$output.' 2>&1 &';
}

return $this->user ? 'sudo -u '.$this->user.' '.$command : $command;
return $this->user && ! windows_os() ? 'sudo -u '.$this->user.' -- sh -c \''.$command.'\'' : $command;
}

/**
Expand Down

0 comments on commit 6c9edd8

Please sign in to comment.