Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace process.exit() with throwing an error #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 16, 2020

  1. replace process.exit() with throwing an error

    Using process.exit() does not allow us to use this tool programmatically, as we cannot then handle the error in a custom way (ie: formatting the response for CI, logging it, somewhere, etc). 
    
    This PR replaces logging to `console.error` + using `process.exit` with throwing an error.  This will have the same effect in CLI usage by immediately terminating the process with a message, but can also be `try/catch` handled in a parent program.
    evantahler authored Mar 16, 2020
    Configuration menu
    Copy the full SHA
    1054593 View commit details
    Browse the repository at this point in the history