-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Explicitly return when an error occurs #443
Comments
Thanks for this! Can you write a few tests showing this code works? |
@SomeKittens Hi, I've updated the patch with some relevant tests. |
Closed
Referenced from #945 This issue has not had any activity in over six months. It isn't likely to get acted on due to this report. Feel free to open a new issue if it comes up again, with new information and renewed interest. Thank you for your contributions. |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Methods that rely on error methods (such as
unknownOption
,missingArgument
, etc...) useprocess.exit()
to stop execution and exit the program. This is quite inconvenient if you want to use Commander in a context other than a shell.If a client extends the Command prototype to avoid having these error methods call
process.exit()
, command execution continues and commander blows up.Personally I am using commander to parse arguments for my Slack bot, extending Command to prevent
process.exit()
s but even still if you input an incorrect command the program will crash.The text was updated successfully, but these errors were encountered: