Skip to content

Commit

Permalink
Delay process.exit for proper drain of streams on node 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
xanf authored and indexzero committed Nov 22, 2014
1 parent 01590ff commit a8314b8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,11 @@ if (! options.watch) {
} catch (err) {
// ignore the undefined jscoverage
}
if (process.stdout.write('')) { // Check if stdout is drained
process.exit(status);
} else {
process.stdout.on('drain', function () {
process.on('exit', function (code) {
if (code === 0) {
process.exit(status);
});
}
}
});
});
} else {
//
Expand Down

0 comments on commit a8314b8

Please sign in to comment.