Allow specifying stdin (#360)

* Allow specifying stdin
This commit is contained in:
Seth Vargo
2020-04-13 13:39:42 -04:00
committed by GitHub
parent 05e39f551d
commit c4b6011310
6 changed files with 67 additions and 0 deletions
+8
View File
@@ -524,6 +524,14 @@ export class ToolRunner extends events.EventEmitter {
resolve(exitCode)
}
})
if (this.options.input) {
if (!cp.stdin) {
throw new Error('child process missing stdin')
}
cp.stdin.end(this.options.input)
}
})
}
}