-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most CLI options not working #1
Comments
Hi @brlodi, thank you for taking the time to investigate and report the issue(s)! There does indeed seem to be something strange going on with the argument handling, I'll poke around and see if I can figure out what's going on. 👍 |
Like you suspected @brlodi, the command line arguments were not being merged properly with the other configuration methods and the single character flag for Unrelated to the issues above, I also noticed you've inverted the Please let me know if you have any further issues and thank you again for the detailed issue description - much appreciated! |
Thanks for tackling this so quickly! It seems like everything is working as expected with 1.0.5. And thank you for pointing out the mapping. I definitely had the real version of it backwards in my |
I initially discovered that passing
--time-format
on the CLI has no effect, and further exploration has shown that there's kind of a mess going on all around.Things I've found turning on debug output:
--newline
,--time-format
, and--property-map
are not applied to resolved configuration, so they don't actually do anything-n
is interpreted as--noColor
instead of--newline
, though using--newline
correctly populates the short alias-n
--color
and--no-color
seem to workMy suspicion is that the arguments and file config are being merged backwards, i.e. command line args are being overwritten by the already-combined config file + defaults map, so any arguments are just obliterated. That would explain why the color options still work, since they don't appear in the default config.
With long form arguments:
Note the correct options are logged, but the resolved config is just the default.
With short form arguments
Note that the
-n
is being picked up asnoColor
instead of newline. I'm guessing theargs
package implicitly creates short aliases by default, so sinceno-color
is defined first it "steals" the result of parsing-n
.The text was updated successfully, but these errors were encountered: