Skip to content

Commit

Permalink
exit watch on SIGINT instead of stdin end
Browse files Browse the repository at this point in the history
stdin's end event is fired immediately if stdin is
not a TTY
  • Loading branch information
ToppleTheNun committed Jan 22, 2022
1 parent c9f6905 commit 1f3c99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if (argv.env) process.env.NODE_ENV = argv.env
if (argv.config) argv.config = path.resolve(argv.config)

if (argv.watch) {
process.stdin.on('end', () => process.exit(0))
process.on('SIGINT', () => process.exit(0))
process.stdin.resume()
}

Expand Down

0 comments on commit 1f3c99f

Please sign in to comment.