Skip to content

Commit 554f126

Browse files
committed
Ensure proper output flushing for Node.js
1 parent 6682673 commit 554f126

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/cli/node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ cli({
1919
quit: function(code){
2020

2121
//Workaround for https://github.com/joyent/node/issues/1669
22-
if (!process.stdout.flush || !process.stdout.flush()) {
22+
23+
if ((!process.stdout.flush || !process.stdout.flush()) && (parseFloat(process.versions.node) < 0.5)) {
2324
process.once("drain", function () {
2425
process.exit(code || 0);
2526
});

0 commit comments

Comments
 (0)