From b2cc2c2749d8b5b248e4e1836449ca515b37a990 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 29 Sep 2025 09:38:47 -0400 Subject: [PATCH] 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 https://github.com/astral-sh/uv/issues/15950. --- crates/uv/src/settings.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index b8826bda6..3da6397a7 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -89,6 +89,9 @@ impl GlobalSettings { color: if let Some(color_choice) = args.color { // If `--color` is passed explicitly, use its value. color_choice + } else if args.no_color { + // If `--no-color` is passed explicitly, disable color output. + ColorChoice::Never } else if std::env::var_os(EnvVars::NO_COLOR) .filter(|v| !v.is_empty()) .is_some()