Skip to content

Commit

Permalink
fix: use error type instead of record (#371)
Browse files Browse the repository at this point in the history
@W-10310042@
  • Loading branch information
peternhale authored Feb 11, 2022
1 parent 520cdc0 commit 136ffe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export default abstract class Command {
return Parser.parse(argv, opts)
}

protected async catch(err: Record<string, any>): Promise<any> {
protected async catch(err: Error & {exitCode?: number}): Promise<any> {
process.exitCode = process.exitCode ?? err.exitCode ?? 1
if (this.jsonEnabled()) {
CliUx.ux.styledJSON(this.toErrorJson(err))
Expand Down

0 comments on commit 136ffe0

Please sign in to comment.