-
Notifications
You must be signed in to change notification settings - Fork 243
Fixing the incorrect error code even when CLI exits correctly #1151
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
Fixing the incorrect error code even when CLI exits correctly #1151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some questions
Any error to perform init etc should result in -1 exit code. |
last exit code should be 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
well, I'll create a separate issue to expand the scope, so that it gives -1 for any kind of errors (like validation errors, parsing errors, etc). Keeping in view the release, we should get this in, as swa cli team uses only |
Co-authored-by: Sean Leonard <[email protected]>
Even if we don't expand the scope now, by removing isParsed we are regressing the existing functionality, where we return -1 if the parsed object is not a recognized command for e.g. |
There has been an issue created for System.CommandLine as to understand why I'll use the workaround for |
… of https://github.com/Azure/data-api-builder into dev/abhishekkuma/fix-incorrect-error-code-with-dab-cli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this update and making sure no regressions occur. Also appreciate your documenting commandline package behavior to justify and design your workaround!
Why make this change?
What is this change?
--help
generatesErrorType.HelpRequestedError
andErrorType.HelpVerbRequestedError
while--version
generatesErrorType.VersionRequestedError
.How was this tested?
Sample Request(s)