While experimenting in https://github.com/agroal/pgagroal/pull/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).
While experimenting in https://github.com/agroal/pgagroal/pull/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
, whilepgagroal-cli
goes to the same label --done
).