We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af285e0 commit 167f3f0Copy full SHA for 167f3f0
src/CAC.ts
@@ -155,6 +155,11 @@ class CAC extends EventEmitter {
155
}
156
return this
157
158
+
159
+ unsetMatchedCommand() {
160
+ this.matchedCommand = undefined
161
+ this.matchedCommandName = undefined
162
+ }
163
164
/**
165
* Parse argv
@@ -209,11 +214,13 @@ class CAC extends EventEmitter {
209
214
if (this.options.help && this.showHelpOnExit) {
210
215
this.outputHelp()
211
216
run = false
217
+ this.unsetMatchedCommand()
212
218
213
219
220
if (this.options.version && this.showVersionOnExit) {
221
this.outputVersion()
222
223
224
225
226
const parsedArgv = { args: this.args, options: this.options }
0 commit comments