Skip to content

Commit ab142f5

Browse files
committed
Manually closing streams
1 parent 537eea5 commit ab142f5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/exec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function execSync(cmd, opts) {
6262
"childProcess.stdout.pipe(stdoutStream, {end: false});",
6363
"childProcess.stderr.pipe(stdoutStream, {end: false});",
6464
"childProcess.stdout.pipe(process.stdout);",
65-
"childProcess.stderr.pipe(process.stderr);"
65+
"childProcess.stderr.pipe(process.stderr);",
66+
"process.stdout.on('end', function(){ stdoutStream.end(); });",
67+
"process.stderr.on('end', function(){ stdoutStream.end(); });"
6668
].join('\n');
6769

6870
fs.writeFileSync(scriptFile, script);

0 commit comments

Comments
 (0)