Skip to content

Commit

Permalink
Manually closing streams
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianLaval committed Aug 11, 2015
1 parent 537eea5 commit ab142f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function execSync(cmd, opts) {
"childProcess.stdout.pipe(stdoutStream, {end: false});",
"childProcess.stderr.pipe(stdoutStream, {end: false});",
"childProcess.stdout.pipe(process.stdout);",
"childProcess.stderr.pipe(process.stderr);"
"childProcess.stderr.pipe(process.stderr);",
"process.stdout.on('end', function(){ stdoutStream.end(); });",
"process.stderr.on('end', function(){ stdoutStream.end(); });"
].join('\n');

fs.writeFileSync(scriptFile, script);
Expand Down

0 comments on commit ab142f5

Please sign in to comment.