Skip to content

Commit b2cc2c2

Browse files
Respect --no-color on the CLI (#16044)
## Summary This argument has always existed for compatibility, but apparently we don't respect it. I assume it was unintentionally dropped during a refactor. Closes #15950.
1 parent 1d76c5a commit b2cc2c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/uv/src/settings.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ impl GlobalSettings {
8989
color: if let Some(color_choice) = args.color {
9090
// If `--color` is passed explicitly, use its value.
9191
color_choice
92+
} else if args.no_color {
93+
// If `--no-color` is passed explicitly, disable color output.
94+
ColorChoice::Never
9295
} else if std::env::var_os(EnvVars::NO_COLOR)
9396
.filter(|v| !v.is_empty())
9497
.is_some()

0 commit comments

Comments
 (0)