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 4247f99 commit 54d5fabCopy full SHA for 54d5fab
src/CAC.ts
@@ -214,13 +214,13 @@ class CAC extends EventEmitter {
214
this.setParsedInfo(parsed)
215
}
216
217
- if (this.options.help && this.showHelpOnExit) {
+ if (this.options.help && this.showHelpOnExit && this.matchedCommandName == null) {
218
this.outputHelp()
219
run = false
220
this.unsetMatchedCommand()
221
222
223
- if (this.options.version && this.showVersionOnExit) {
+ if (this.options.version && this.showVersionOnExit && this.matchedCommandName == null) {
224
this.outputVersion()
225
226
0 commit comments