Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using `process.exit` in order to ensure that all output is written prior to process termination. From the Node.js documentation: > Rather than calling process.exit() directly, the code should set the > process.exitCode and allow the process to exit naturally by avoiding > scheduling any additional work for the event loop: > > // How to properly set the exit code while letting > // the process exit gracefully. > if (someConditionNotMet()) { > printUsageToStdout(); > process.exitCode = 1; > } > > If it is necessary to terminate the Node.js process due to an error > condition, throwing an uncaught error and allowing the process to > terminate accordingly is safer than calling process.exit(). Source: https://nodejs.org/api/process.html#process_process_exit_code
- Loading branch information