Skip to content

Commit

Permalink
Reset subcommand parse state when dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit committed Jul 30, 2023
1 parent 56eed63 commit 4a7bc41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/command.js
Expand Up @@ -1128,6 +1128,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
_dispatchSubcommand(commandName, operands, unknown) {
const subCommand = this._findCommand(commandName);
if (!subCommand) this.help({ error: true });
subCommand.resetParseState();

let hookResult;
hookResult = this._chainOrCallSubCommandHook(hookResult, subCommand, 'preSubcommand');
Expand Down

0 comments on commit 4a7bc41

Please sign in to comment.