fixes #1633: error output when using `coffee -e`
This commit is contained in:
parent
539b872e02
commit
b4e2240ede
|
@ -141,7 +141,7 @@
|
|||
CoffeeScript.emit('failure', err, task);
|
||||
if (CoffeeScript.listeners('failure').length) return;
|
||||
if (o.watch) return printLine(err.message);
|
||||
printWarn(err.stack);
|
||||
printWarn(err instanceof Error && err.stack || ("ERROR: " + err));
|
||||
return process.exit(1);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -140,7 +140,7 @@ compileScript = (file, input, base) ->
|
|||
CoffeeScript.emit 'failure', err, task
|
||||
return if CoffeeScript.listeners('failure').length
|
||||
return printLine err.message if o.watch
|
||||
printWarn err.stack
|
||||
printWarn err instanceof Error and err.stack or "ERROR: #{err}"
|
||||
process.exit 1
|
||||
|
||||
# Attach the appropriate listeners to compile scripts incoming over **stdin**,
|
||||
|
|
Loading…
Reference in New Issue