Skip to content

Conversation

mjcheetham
Copy link
Contributor

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
Contributor

@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
Contributor 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