Skip to content

Commit 809db10

Browse files
Sun Haoranegoist
authored andcommitted
fix: stop running command with help or version (#64)
1 parent 7d68125 commit 809db10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CAC.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,12 @@ class CAC extends EventEmitter {
208208

209209
if (this.options.help && this.showHelpOnExit) {
210210
this.outputHelp()
211+
run = false
211212
}
212213

213214
if (this.options.version && this.showVersionOnExit) {
214215
this.outputVersion()
216+
run = false
215217
}
216218

217219
const parsedArgv = { args: this.args, options: this.options }

0 commit comments

Comments
 (0)