You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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. orhun/halp#20
c.f. https://github.com/sile-typesetter/sile/pull/1737/files
c.f. lunarmodules/busted#732
c.f. lunarmodules/busted#733 (comment)
The text was updated successfully, but these errors were encountered: