Skip to content

Commit

Permalink
fix: exit with code 1 on crash if --exitcrash (#946)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bdentino authored and remy committed Sep 4, 2017
1 parent 481dc8f commit facc8cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/monitor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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' +
Expand Down

0 comments on commit facc8cb

Please sign in to comment.