From 33644fc7e97621fd38d991dd2484a5be9aa6f729 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 13 Sep 2017 05:42:08 -0500 Subject: [PATCH] Close process when stdin is closed. --- bin/nuxt | 6 ++++++ 1 file changed, 6 insertions(+) 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()