diff --git a/bin/uglifyjs b/bin/uglifyjs index d86a43a3..96eef27e 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -3,6 +3,12 @@ "use strict"; +// workaround for tty output truncation upon process.exit() +[process.stdout, process.stderr].forEach(function(stream){ + if (stream._handle && stream._handle.setBlocking) + stream._handle.setBlocking(true); +}); + var fs = require("fs"); var info = require("../package.json"); var path = require("path"); diff --git a/tools/node.js b/tools/node.js index 03de1272..9c82e747 100644 --- a/tools/node.js +++ b/tools/node.js @@ -1,9 +1,3 @@ -// workaround for tty output truncation upon process.exit() -[process.stdout, process.stderr].forEach(function(stream){ - if (stream._handle && stream._handle.setBlocking) - stream._handle.setBlocking(true); -}); - var fs = require("fs"); var UglifyJS = exports;