Skip to content

Commit

Permalink
If there was no command run, make sure to still append the command to…
Browse files Browse the repository at this point in the history
… argv
  • Loading branch information
jonpugh committed Feb 7, 2018
1 parent 2a6ce77 commit 75c6739
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/provision-robo.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@
$io->warningLite(' Running `provision setup` command to fix the problems... ');
}

// Replace given command with "setup", unless there is no command, then append to argv.
$command = $input->getFirstArgument();
$command_key = array_search($input->getFirstArgument(), $argv);
$argv[$command_key] = 'setup';
if (empty($command_key)) {
$argv[] = 'setup';
}
else {
$argv[$command_key] = 'setup';
}
$input = new ArgvInput($argv);
$io = new ProvisionStyle($input, $output);
$config = new Config($io, FALSE);
Expand Down

0 comments on commit 75c6739

Please sign in to comment.