improve CLI interoperability (#5762)

This commit is contained in:
Alex Lam S.L
2022-12-11 07:25:06 +02:00
committed by GitHub
parent 78242ff21d
commit 797184f587
2 changed files with 13 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ try {
} catch (e) {
// ensure output buffers are flushed before process termination
var exit = process.exit;
process.exit = function() {
if ("bufferSize" in process.stdout) process.exit = function() {
var args = [].slice.call(arguments);
process.once("uncaughtException", function() {
(function callback() {