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

Commit

Permalink
fix: EEXIT error raised by sfdx-cli results in err instanceof ExitErr…
Browse files Browse the repository at this point in the history
…or equals false
  • Loading branch information
jayree committed May 9, 2021
1 parent 38fb591 commit c606f3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable unicorn/no-process-exit */
import {config} from './config'
import prettyPrint, {PrettyPrintableError} from './errors/pretty-print'
import {ExitError} from '.'
import clean = require('clean-stack')
import {OclifError, CLIError} from './errors/cli'

Expand All @@ -11,7 +10,7 @@ export const handle = (err: Error & Partial<PrettyPrintableError> & Partial<Ocli
if (!err) err = new CLIError('no error?')
if (err.message === 'SIGINT') process.exit(1)

const shouldPrint = !(err instanceof ExitError)
const shouldPrint = !(err.code === 'EEXIT')
const pretty = prettyPrint(err)
const stack = clean(err.stack || '', {pretty: true})

Expand Down

0 comments on commit c606f3e

Please sign in to comment.