Skip to content

Commit b4a2cfd

Browse files
committed
close stream after setting returncode
1 parent e1f6fe4 commit b4a2cfd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

node/toolrunner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,15 +681,15 @@ export class ToolRunner extends events.EventEmitter {
681681
});
682682
cpFirst.on('close', (code, signal) => {
683683
waitingEvents--; //first process is complete
684-
if (fileStream) {
685-
fileStream.end();
686-
}
687684
if (code != 0 && !options.ignoreReturnCode) {
688685
successFirst = false;
689686
returnCodeFirst = code;
690687
returnCode = returnCodeFirst;
691688
}
692689
this._debug('success of first tool:' + successFirst);
690+
if (fileStream) {
691+
fileStream.end();
692+
}
693693
cp.stdin.end();
694694
if(waitingEvents == 0) {
695695
if (error) {

0 commit comments

Comments
 (0)