1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 00:10:15 +00:00

Fix stack reporting glitch.

This commit is contained in:
hacksalot 2016-01-10 13:28:20 -05:00
parent fee21a7b17
commit a4ee7127ee

View File

@ -16,7 +16,8 @@ Error-handling routines for HackMyResume.
, FCMD = require('../hackmyapi')
, PATH = require('path')
, WRAP = require('word-wrap')
, chalk = require('chalk');
, chalk = require('chalk')
, SyntaxErrorEx = require('../utils/syntax-error-ex');
@ -67,7 +68,7 @@ Error-handling routines for HackMyResume.
// Selectively show the stack trace
if( (ex.stack || (ex.inner && ex.inner.stack)) &&
((showStack && ex.code !== 'ENOENT' ) || (this.debug) ))
log( chalk.red( ex.stack || ex.stack.inner ) );
log( chalk.red( ex.stack || ex.inner.stack ) );
// Let the error code be the process's return code.
( shouldExit || ex.shouldExit ) && process.exit( exitCode );