Skip to content

Commit 96f1e4a

Browse files
kasbahdevongovett
authored andcommitted
Fully fixes #989 - make -h same as help command (#1057)
1 parent 59c8d8d commit 96f1e4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ program.on('--help', function() {
137137

138138
// Make serve the default command except for --help
139139
var args = process.argv;
140-
if (args[2] === '--help') args[2] = 'help';
140+
if (args[2] === '--help' || args[2] === '-h') args[2] = 'help';
141141
if (!args[2] || !program.commands.some(c => c.name() === args[2])) {
142142
args.splice(2, 0, 'serve');
143143
}

0 commit comments

Comments
 (0)