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

Return non-zero exit code on exception #441

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

mjcheetham
Copy link
Collaborator

Return a non-zero program exit code when an unhandled exception is encountered at the top-level command line handling.

Fixes #440

Return a non-zero program exit code when an unhandled exception is
encountered at the top-level command line handling.
Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Makes sense. Are there potentially other code sites that would need this kind of treatment, too?

@mjcheetham
Copy link
Collaborator Author

Are there potentially other code sites that would need this kind of treatment, too?

Almost all code is contained within System.CommandLine callbacks, so either the commands return the exit code (already do) or the exception handler sets the exit code (this PR).

@mjcheetham mjcheetham merged commit 540a398 into git-ecosystem:main Sep 7, 2021
@mjcheetham mjcheetham deleted the exiterror branch September 7, 2021 13:47
@mjcheetham mjcheetham mentioned this pull request Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exit code does not indicate failure when credentials are not found
3 participants