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

command: use exit code 2 if arguments are invalid #151

Closed
wants to merge 2 commits into from

Conversation

davidchambers
Copy link
Owner

There are now three possible exit codes:

  • 2 – invalid arguments
  • 1 – test failures
  • 0 – success

"commander": "2.20.x",
"commander": "4.0.x",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/tj/commander.js/releases/tag/v4.0.0:

.exitOverride() allows override of calls to process.exit for additional error handling and to keep program running (tj/commander.js#1040)

@davidchambers
Copy link
Owner Author

Aldwin pointed me to https://tldp.org/LDP/abs/html/exitcodes.html which suggests avoiding exit codes such as 1 and 2.

Let's give the matter more thought then update exit codes comprehensively.

@davidchambers davidchambers deleted the exit-code branch January 17, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant