From d7a1296d04bc0875f67d738b9b36296b35b39fa1 Mon Sep 17 00:00:00 2001 From: Michael Schoonmaker Date: Mon, 28 Aug 2017 16:29:39 -0700 Subject: [PATCH] Clean up exits. If a script exits with a non-zero code, scripty should not throw a noisy error. Furthermore, setting process.exitCode allows the process tree to terminate normally, rather than forcibly killing it with process.exit(). --- cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli.js b/cli.js index a137f1d..65ba2f3 100755 --- a/cli.js +++ b/cli.js @@ -35,7 +35,6 @@ if (!lifecycleEvent) { scriptsWin: loadOption('windowsPath') } }, function (er, code) { - if (er) { throw er } - process.exit(code) + process.exitCode = code }) }