Parsing --help needs to return something other than an error
The way the --help text is parsed the message is returned in the same field as an actual parsing error, and the return code is the same as if it was a failure case. However a user actually passing --help explicitly should be considered a success.
The only way I came up with to work around this was to test the error string for :match("^Usage:") and switch gears from error handling to closing with a success status after the message. There really should be a more ergonomic way to do this. As it is most lua apps that implement CLIs with this library return a failure code when they should not.
c.f. https://github.com/orhun/halp/issues/20 c.f. https://github.com/sile-typesetter/sile/pull/1737/files c.f. https://github.com/lunarmodules/busted/pull/732 c.f. https://github.com/lunarmodules/busted/pull/733#discussion_r1429943388
This issue should be resolved by https://github.com/lunarmodules/lua_cliargs/pull/78.