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

Remove stack trace for ENOENT.

This commit is contained in:
hacksalot 2016-01-01 14:58:56 -05:00
parent 43873efcab
commit 37a7c318d5

View File

@ -84,7 +84,8 @@
var trimmed = idx === -1 ? msg : msg.substring( idx + 7 ); var trimmed = idx === -1 ? msg : msg.substring( idx + 7 );
if( !ex.fluenterror || ex.fluenterror < 3 ) { // TODO: magic #s if( !ex.fluenterror || ex.fluenterror < 3 ) { // TODO: magic #s
console.log( chalk.red.bold('ERROR: ' + trimmed.toString()) ); console.log( chalk.red.bold('ERROR: ' + trimmed.toString()) );
console.log( chalk.gray(ex.stack) ); if( ex.code !== 'ENOENT' ) // Don't emit stack for common stuff
console.log( chalk.gray(ex.stack) );
} }
else { else {
console.log( trimmed.toString() ); console.log( trimmed.toString() );