From 4a7bc412e10e017499595b43ba523a13b8969a71 Mon Sep 17 00:00:00 2001 From: aweebit <36817090+aweebit@users.noreply.github.com> Date: Sun, 30 Jul 2023 06:36:12 +0300 Subject: [PATCH] Reset subcommand parse state when dispatching --- lib/command.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/command.js b/lib/command.js index ec98e868f..436b01352 100644 --- a/lib/command.js +++ b/lib/command.js @@ -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');