Closed neomilium closed 2 years ago
I'm facing a boolean option parsing error: when using negated option (e.g. --no-foo) followed by argument, the parsed value is not the expected one.
--no-foo
Context: In modulesync, we use thor. I expect to contribute a new command to be used like this:
thor
msync execute --no-fail-fast -- /path/to/script --script-option
But the options hash returned by thor after parsing this command line is:
options
{ "fail_fast" => true }
Which is not the expected value ;-)
Please note that if --no-fail-fast option is the last one, its OK:
--no-fail-fast
$ msync execute --no-fail-fast { "fail_fast" => false } $ msync execute /path/to/script --no-fail-fast { "fail_fast" => false }
First, I commited a small test, attempting to target the problem.
This bug was a side-effect of system's thor load (through system's bundle command).
bundle
Solved uninstalling ruby-thor package (and ruby-bundler) and install them through gem.
ruby-thor
ruby-bundler
gem
I'm facing a boolean option parsing error: when using negated option (e.g.
--no-foo
) followed by argument, the parsed value is not the expected one.Context: In modulesync, we use
thor
. I expect to contribute a new command to be used like this:But the
options
hash returned bythor
after parsing this command line is:Which is not the expected value ;-)
Please note that if
--no-fail-fast
option is the last one, its OK:First, I commited a small test, attempting to target the problem.