From 279d3a800083d742afbb0ae8d913db52d233d5da Mon Sep 17 00:00:00 2001 From: Michael Yong Date: Tue, 20 Sep 2016 01:31:29 -0700 Subject: [PATCH] Don't call process.exit(0) on success. This causes commands like `optimize-js large-file.js` to not output the full output to stdout. To repro: ``` $ curl -O https://code.jquery.com/jquery-3.0.0.min.js $ optimize-js jquery-3.0.0.min.js | wc // 3 982 65536 $ optimize-js jquery-3.0.0.min.js > foo.js $ cat foo.js | wc // 5 1312 86638 ``` --- lib/bin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/bin.js b/lib/bin.js index fb0fccd..599682a 100755 --- a/lib/bin.js +++ b/lib/bin.js @@ -25,7 +25,6 @@ inStream.pipe(concat(function (buf) { try { var out = optimizeJs(str, opts) console.log(out) - process.exit(0) } catch (err) { console.error(err) process.exit(1)