aswi2020vldc-gitlab/templetes/node_modules/terser/tools/exit.js @ 143404cb
1 | 3a515b92 | cagy | // workaround for tty output truncation upon process.exit()
|
---|---|---|---|
2 | var exit = process.exit; |
||
3 | process.exit = function() { |
||
4 | var args = [].slice.call(arguments); |
||
5 | process.once("uncaughtException", function() { |
||
6 | (function callback() { |
||
7 | if (process.stdout.bufferSize || process.stderr.bufferSize) { |
||
8 | setImmediate(callback); |
||
9 | } else { |
||
10 | exit.apply(process, args); |
||
11 | }
|
||
12 | })();
|
||
13 | });
|
||
14 | throw exit; |
||
15 | };
|