Skip to content

Commit

Permalink
Run default command if it's not just *
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Sep 29, 2019
1 parent 2544df8 commit 94df44e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -681,7 +681,7 @@ Command.prototype.parseArgs = function(args, unknown) {
if (unknown.length > 0) {
this.unknownOption(unknown[0]);
}
if (this.commands.length === 0 &&
if ((this.commands.length !== 1 || this.commands[0]._name !== "*") &&
this._args.filter(function(a) { return a.required; }).length === 0) {
this.emit('command:*');
}
Expand Down

0 comments on commit 94df44e

Please sign in to comment.