Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
fix: show stack trace when debug is on
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 26, 2018
1 parent 669f803 commit 2841c67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function displayError(err: CLIError) {
let msg = err['cli-ux'].scope ? `${err['cli-ux'].scope}: ${getErrorMessage(err)}` : getErrorMessage(err)
if (err['cli-ux'].severity === 'fatal') {
bang = chalk.bgRed.bold.white(' FATAL ')
}
if (err['cli-ux'].severity === 'fatal' || config.debug) {
msg += `\n${inspect(err)}`
}
if (err['cli-ux'].severity === 'warn') bang = chalk.yellow(arrow)
Expand Down

0 comments on commit 2841c67

Please sign in to comment.