disable Force color over no color#8183
disable Force color over no color#8183Aditya-PS-05 wants to merge 0 commit intoastral-sh:mainfrom Aditya-PS-05:bug/8173-force-color
Conversation
crates/uv/src/settings.rs
Outdated
| } else if matches!( | ||
| args.color, | ||
| ColorChoice::Always | ColorChoice::Never | ColorChoice::Auto | ||
| ) { | ||
| // If `--color` is passed explicitly, use the value of `args.color` directly. | ||
| args.color |
There was a problem hiding this comment.
Won't this always match since the default is "auto" at the clap-level?
There was a problem hiding this comment.
Yupp, But I thought if --color is passed explicitly, we can use the value of args.color directly.
There was a problem hiding this comment.
Also, when I tested the expected result was coming for all three separate cases. Means for FORCE_COLOR and --color and with sub arguments.
There was a problem hiding this comment.
Won't this always match since the default is "auto" at the clap-level?
Done purposely, as when the user does not anything (neither the environment variables nor the --color), then I wanted the auto property. As If --color is given, it doesn't matter the value, we can always use them.
|
Unless I'm missing something, I believe this changes standard behavior since env var should still take priority over cli when honoring the order of For example, if you have |
Should it? Honestly not sure. |
Fair, I was considering CI scenarios when I said this. Wouldn't this be a breaking if changed? |
|
The docs (https://no-color.org/) at least state that "per-instance command-line arguments should override the NO_COLOR environment variable". |
Does the same apply for FORCE_COLOR? Or CLICOLOR_FORCE? |
Sounds like it does at least for I've likely been using it wrong 😆 To me, its a bit vague since the relationship between Sounds like
What about an explicit |
|
Yeah, agree with this @samypr100:
I think |
|
@Aditya-PS-05 - Do you plan to pursue the follow-up changes mentioned here? |
@charliermarsh |
|
All the required changes are done in the pr #8215 |
closes #8173