From 3849df359722129168cea13e4e418aca57e7e179 Mon Sep 17 00:00:00 2001 From: Ivan Yatskevich Date: Fri, 18 Aug 2017 17:53:55 +0300 Subject: [PATCH] exit process with 0 code explicitly in case of successful command execution Functions scheduled via setTimeout will prevent nodejs app from exiting. In case truffle.js config contains code which calls setTimeout (e.g. web3-provider-engine starts block tracker) truffle CLI will 'hang' after successful execution of a command. --- cli.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli.js b/cli.js index 50430c4..5a5c1c6 100755 --- a/cli.js +++ b/cli.js @@ -34,4 +34,6 @@ command.run(process.argv.slice(2), options, function(err) { } process.exit(1); } + + process.exit(0); });