Permalink
Browse files

on close so stderr has time to finish

  • Loading branch information...
1 parent 1d05514 commit 3ca6b208e7c69998f52cd83e0ac60ce3b2d48ebf @substack committed Oct 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -14,7 +14,7 @@ module.exports = function (cmd, args, opts) {
ps.stderr.on('data', function (buf) { err += buf });
}
- ps.on('exit', function (code) {
+ ps.on('close', function (code) {
if (code === 0) return;
dup.emit('error', new Error('non-zero exit code ' + code + ': ' + err));
});

0 comments on commit 3ca6b20

Please sign in to comment.