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

Commit a0f770c

Browse files
committed
fix: trap hook error
1 parent 01b873b commit a0f770c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/command.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ export default abstract class Command {
103103
} catch (err) {
104104
if (err.code === 'EEXIT') throw err
105105
if (this.config && this.config.engine) {
106-
await this.config.engine.runHook('error', err)
106+
try {
107+
await this.config.engine.runHook('error', err)
108+
} catch (err) {
109+
cli.warn(err, {context: {description: 'error running hook'}})
110+
}
107111
}
108112
cli.error(err)
109113
}

0 commit comments

Comments
 (0)