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

Fix exit status when parsing error occurs in pgagroal-cli #431

Closed
wants to merge 1 commit into from

Conversation

decarv
Copy link
Contributor

@decarv decarv commented Mar 28, 2024

While experimenting in #427, I found out that pgagroal-cli returns an exit status of 0, indicating success to the caller, if a command parsing error occurs.

This commit resolves the issue by setting exit_error = 1; after a parsing error, ensuring it properly returns the correct error status to the caller.

Notice that the same does not occur with pgagroal-admin (it has a different way of handling errors -- goto error, while pgagroal-cli goes to the same label --done).

Before this commit, a parsing error in pgagroal-cli would
return an exit status of 0, indicating success.

This commit resolves the issue by setting `exit_error = 1;`
after a parsing error, ensuring it properly returns the correct
error status to the caller.
@fluca1978
Copy link
Collaborator

Looks fine to me.
@jesperpedersen PTAL

@jesperpedersen
Copy link
Collaborator

Rebased, and merged.

Thanks for your contribution !

@jesperpedersen jesperpedersen self-requested a review March 29, 2024 11:41
@jesperpedersen jesperpedersen added the bug Something isn't working label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants