Permalink
Browse files

Merge pull request #156 from noway421/patch-1

Fixing issue with subcommands and --help
  • Loading branch information...
2 parents 62cd70c + 3a1e7b5 commit 976640604253a373241d85ba057098d99526c63d @tj committed Jul 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 index.js
View
@@ -372,10 +372,12 @@ Command.prototype.parse = function(argv){
var parsed = this.parseOptions(this.normalize(argv.slice(2)));
var args = this.args = parsed.args;
+ var result = this.parseArgs(this.args, parsed.unknown);
+
// executable sub-commands, skip .parseArgs()
if (this.executables) return this.executeSubCommand(argv, args, parsed.unknown);
- return this.parseArgs(this.args, parsed.unknown);
+ return result;
};
/**

0 comments on commit 9766406

Please sign in to comment.