Skip to content

Commit

Permalink
Fixes #989 - make --help same as help command (#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
osdevisnot authored and devongovett committed Mar 23, 2018
1 parent 86045d3 commit 59c8d8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ program.on('--help', function() {
console.log('');
});

// Make serve the default command
// Make serve the default command except for --help
var args = process.argv;
if (args[2] === '--help') args[2] = 'help';
if (!args[2] || !program.commands.some(c => c.name() === args[2])) {
args.splice(2, 0, 'serve');
}
Expand Down

0 comments on commit 59c8d8d

Please sign in to comment.