Skip to content

Commit

Permalink
Fixed issue when artisan command is not wrapped around single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcalonso committed Jan 28, 2016
1 parent 1c14f2b commit 938c717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ function __construct(array $config)
*/
public function scheduledCommand(Event $event)
{
$eventCommand = explode("'artisan' ", $event->command)[1];
preg_match("/(artisan |'artisan' )(.*)/us", $event->command, $matches);
$eventCommand = $matches[2];

$event->sendOutputTo(base_path() . '/storage/logs/'.$eventCommand.'.txt');
if (is_null($event->output)) {
Expand Down

0 comments on commit 938c717

Please # to comment.