Skip to content

Commit

Permalink
don't exit until stdout is drained
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jun 28, 2010
1 parent d1b71d8 commit 30e6688
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ if (! options.watch) {
sys.print(str.replace(/^\n\n/, '\n'));
}
});
process.exit(results.honored + results.pending == results.total ? 0 : 1);
process.stdout.addListener('drain', function () {
process.exit(results.honored + results.pending == results.total ? 0 : 1);
});
});
} else {
msg('watcher', 'watching files in', process.cwd() + '/');
Expand Down

0 comments on commit 30e6688

Please sign in to comment.