Skip to content

Commit

Permalink
Don't call process.exit(0) on success. (#11)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
ymichael authored and nolanlawson committed Sep 20, 2016
1 parent d8445f9 commit 3951a47
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3951a47

Please sign in to comment.