We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0270596 + 8c7a838 commit a52d786Copy full SHA for a52d786
source-map-support.js
@@ -430,11 +430,17 @@ function getErrorSource(error) {
430
function printErrorAndExit (error) {
431
var source = getErrorSource(error);
432
433
+ // Ensure error is printed synchronously and not truncated
434
+ if (process.stderr._handle && process.stderr._handle.setBlocking) {
435
+ process.stderr._handle.setBlocking(true);
436
+ }
437
+
438
if (source) {
- fs.writeSync(2, "\n" + source + "\n");
439
+ console.error();
440
+ console.error(source);
441
}
442
- fs.writeSync(2, error.stack + "\n");
443
+ console.error(error.stack);
444
process.exit(1);
445
446
0 commit comments