Skip to content

Commit

Permalink
prevent internal error: write after end
Browse files Browse the repository at this point in the history
  • Loading branch information
charlierudolph committed Jul 2, 2015
1 parent fcab756 commit 86e2d57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ function execSync(cmd, opts) {
" fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');",
"});",
"var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');",
"childProcess.stdout.pipe(stdoutStream);",
"childProcess.stderr.pipe(stdoutStream);",
"childProcess.stdout.pipe(stdoutStream, {end: false});",
"childProcess.stderr.pipe(stdoutStream, {end: false});",
"childProcess.stdout.pipe(process.stdout);",
"childProcess.stderr.pipe(process.stderr);"
].join('\n');
Expand Down

0 comments on commit 86e2d57

Please sign in to comment.