Closed whmountains closed 8 months ago
Hi,
Thank you for the bug report.
Indeed, CliMate defaults to false when reading boolean options. That was a bad choice, I don't remember why. I'll have to update climate to v3 to remove that.
Great! Locally I rewrote it to use OptionParser, but climate does have a lot more features in things like automatic printing of usage. One thing you might consider is changing climate to use OptionParser under the hood for actual parsing of the arguments, while exposing a nicer API.
CliMate is using OptionParser.
It was forcing booleans to default to false, for whatever reason. I just removed that. You can now use mix_version 2.2.1
and it should work as intended.
Tell me if it works for you :)
Oh! Does that mean the negation flags work too? For example would --no-anotate
disable annotations when the mix config has annotate: true
?
I just installed the latest version and it works great.
As an aside, digging through your codebase to find the issue was a pleasure. Really clean and easy to understand.
Thank you for the the quick fix and excellent tool.
Yes it would, i tested all -a
, --no-annotation
and no option with both [annotate: true]
and [annotate: false]
Thank you for your kind words!
Steps to reproduce:
mix version -p
What seems to be happening is that CLIMate returns
false
instead ofnil
when the annotate option is not specified, which overrides anything specified in the project.