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

Commit 5a11723

Browse files
committed
fix: always raise errors
1 parent 547caa0 commit 5a11723

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/command.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,10 @@ export default abstract class Command {
7373
await this.run()
7474
await this.done()
7575
} catch (err) {
76-
// throw HelpErr to allow the CLI to do something with it
77-
switch (err.code) {
78-
case 'EEXIT': break
79-
case 'EHELP': throw err
80-
default:
81-
deps.cli.error(err)
76+
if (this.config && this.config.engine) {
77+
await this.config.engine.runHook('error', err)
8278
}
79+
deps.cli.error(err)
8380
}
8481
return this
8582
}

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"rootDir": "./src",
1111
"strict": true,
1212
"strictFunctionTypes": false,
13+
"sourceMap": true,
1314
"target": "es2017"
1415
},
1516
"include": [

0 commit comments

Comments
 (0)