Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Adding the ability to run many commands without the -c syntax if th…
Browse files Browse the repository at this point in the history
…ey do not have parameters that collide with lepew-penelope.
  • Loading branch information
tizzo committed Nov 12, 2014
1 parent 22f0562 commit b49194d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/penelope-control
Expand Up @@ -85,8 +85,15 @@ loader.load(function(error, config) {

case 'run':
if (!config.command) {
console.error('--command (-c) is required for use with the run command.');
process.exit(1);
if (!config._[2]) {
console.error('--command (-c) is required for use with the run command.');
process.exit(1);
}
else {
var params = arguments = Array.prototype.slice.call(process.argv, 0);
var position = params.indexOf('run') + 2;
config.command = params.splice(position, params.length).join(' ');
}
}
var args = parse(config.command);
var binary = args.shift();
Expand Down

0 comments on commit b49194d

Please sign in to comment.