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
```
This commit is contained in:
Jo 2025-04-21 20:29:45 +08:00 committed by GitHub
parent 06134f34ea
commit 2cb998847c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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),
}