Close process when stdin is closed.

This commit is contained in:
Nolan Darilek 2017-09-13 05:42:08 -05:00
parent dcf35933c0
commit 33644fc7e9

View File

@ -23,3 +23,9 @@ if (commands.has(cmd)) {
const bin = join(__dirname, 'nuxt-' + cmd) const bin = join(__dirname, 'nuxt-' + cmd)
require(bin) require(bin)
// Exit if stdin is closed
process.stdin.on('close', function() {
process.exit()
})
process.stdin.resume()