From 4b8a2de66038fe14d3a0646d28dc0bd444d14068 Mon Sep 17 00:00:00 2001 From: John Mumm Date: Thu, 20 Mar 2025 19:59:46 +0100 Subject: [PATCH] Add boolish value parser for *MANAGED_PYTHON flags (#12345) There was a bug where `UV_MANAGED_PYTHON` and `UV_NO_MANAGED_PYTHON` only accepted `true` or `false`. This switches to the boolish value parser for those flags. Closes #12336 --- crates/uv-cli/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 13224adc7..4387fc58f 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -155,6 +155,7 @@ pub struct GlobalArgs { long, help_heading = "Python options", env = EnvVars::UV_MANAGED_PYTHON, + value_parser = clap::builder::BoolishValueParser::new(), overrides_with = "no_managed_python", conflicts_with = "python_preference" )] @@ -168,6 +169,7 @@ pub struct GlobalArgs { long, help_heading = "Python options", env = EnvVars::UV_NO_MANAGED_PYTHON, + value_parser = clap::builder::BoolishValueParser::new(), overrides_with = "managed_python", conflicts_with = "python_preference" )]