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
This may not be easily fixable. The problem is that GLI is using the standard library OptionParser under the hood. It hard-codes --versionand interprets -v as --version. What's happening is that when you run bundle exec ruby ./ecm.rb bar -v, since bar does not accept -v, that is getting passed to the OptionParser as --version, which uses OptionParser's internal version that GLI doesn't use.
That's all fine, except that OptionParser is calling exit instead of raising an exception.
I'm leaving this open as documentation, but I'm not sure how to fix it.
Hi,
when I run the following code, I get
It doesn't even print the defined version number.
I was expecting to see
error: Unknown option -v
. Is this a bug?It prints the version number if you put
-v
before the sub-command, as I expected:If a sub-command knows
-v
, you get it as a local option, as I expected:The text was updated successfully, but these errors were encountered: