Only listen for stdin close on TTYs (#8523)
This commit is contained in:
parent
436b543d70
commit
14f6574318
1 changed files with 4 additions and 2 deletions
|
|
@ -875,8 +875,10 @@ async function build() {
|
|||
|
||||
if (shouldWatch) {
|
||||
/* Abort the watcher if stdin is closed to avoid zombie processes */
|
||||
process.stdin.on('end', () => process.exit(0))
|
||||
process.stdin.resume()
|
||||
if (process.stdin.isTTY) {
|
||||
process.stdin.on('end', () => process.exit(0))
|
||||
process.stdin.resume()
|
||||
}
|
||||
startWatcher()
|
||||
} else {
|
||||
buildOnce()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue