From 81d2e2f5553927e31de8979adc45d0f40a55d86e Mon Sep 17 00:00:00 2001 From: Brian Dentino Date: Wed, 30 Nov 2016 23:11:51 -0800 Subject: [PATCH] Exit with code 1 on crash if --exitcrash I'm using nodemon in a docker container with a restart policy configured to restart the container in case it crashes. If the app crashes, nodemon exits with code 0 and docker assumes it was a graceful exit, so it does not restart my container. I don't see the harm in changing the exit code here to reflect an unexpected termination, given that this path is only exercised in the event of a crash. --- lib/monitor/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index b98251b5..bff2ce91 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -156,7 +156,7 @@ function run(options) { if (options.exitcrash) { utils.log.fail('app crashed'); if (!config.required) { - process.exit(0); + process.exit(1); } } else { utils.log.fail('app crashed - waiting for file changes before' +