Hacker News new | ask | show | jobs
by gcommer 616 days ago
Even better: never use process.exit(). Set process.exitCode instead.

https://nodejs.org/api/process.html#processexitcode

1 comments

Or just throw an error.

See also `process.on('exit', ...)`; you can conditionally set process.exitCode in it (only if there was no other failure) if you want.