move TTY workaround to CLI

This commit is contained in:
alexlamsl 2017-04-15 22:56:05 +08:00
parent a70e9b096c
commit c14ff76eed
2 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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;