Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: always raise errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 19, 2018
1 parent 547caa0 commit 5a11723
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,10 @@ export default abstract class Command {
await this.run()
await this.done()
} catch (err) {
// throw HelpErr to allow the CLI to do something with it
switch (err.code) {
case 'EEXIT': break
case 'EHELP': throw err
default:
deps.cli.error(err)
if (this.config && this.config.engine) {
await this.config.engine.runHook('error', err)
}
deps.cli.error(err)
}
return this
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"rootDir": "./src",
"strict": true,
"strictFunctionTypes": false,
"sourceMap": true,
"target": "es2017"
},
"include": [
Expand Down

0 comments on commit 5a11723

Please sign in to comment.