diff --git a/bin/nuxt b/bin/nuxt index 90bc808599..1587abf689 100755 --- a/bin/nuxt +++ b/bin/nuxt @@ -23,3 +23,9 @@ if (commands.has(cmd)) { const bin = join(__dirname, 'nuxt-' + cmd) require(bin) + +// Exit if stdin is closed +process.stdin.on('close', function() { + process.exit() +}) +process.stdin.resume()