From 2cb998847c1c2b475a237edcea2811b5096ac017 Mon Sep 17 00:00:00 2001 From: Jo <10510431+j178@users.noreply.github.com> Date: Mon, 21 Apr 2025 20:29:45 +0800 Subject: [PATCH] Fix `SourceNotAllowed` error message (#13012) ## Summary Before: ```console $ uv python list py --managed-python error: Interpreter discovery for `executable name `py`` requires `search path` but only only managed is allowed ``` After: ```console $ uv python list py --managed-python error: Interpreter discovery for `executable name `py`` requires `search path` but only `only managed` is allowed ``` --- crates/uv-python/src/discovery.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index 0a6d8685b..9bfef91db 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -239,7 +239,7 @@ pub enum Error { InvalidVersionRequest(String), // TODO(zanieb): Is this error case necessary still? We should probably drop it. - #[error("Interpreter discovery for `{0}` requires `{1}` but only {2} is allowed")] + #[error("Interpreter discovery for `{0}` requires `{1}` but only `{2}` is allowed")] SourceNotAllowed(PythonRequest, PythonSource, PythonPreference), }