Skip to content

Commit

Permalink
fix: stop running command with help or version (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun Haoran authored and egoist committed Jan 27, 2020
1 parent 7d68125 commit 809db10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CAC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ class CAC extends EventEmitter {

if (this.options.help && this.showHelpOnExit) {
this.outputHelp()
run = false
}

if (this.options.version && this.showVersionOnExit) {
this.outputVersion()
run = false
}

const parsedArgv = { args: this.args, options: this.options }
Expand Down

0 comments on commit 809db10

Please sign in to comment.