Add `ProvidedPath` to interpreter sources considered when `UV_TEST_PYTHON_PATH` is set (#4027)

Just a theory, but I presume this would close
https://github.com/astral-sh/uv/issues/4023.

I'm not sure how else we'd end up in this case.
This commit is contained in:
Zanie Blue 2024-06-05 10:52:28 -04:00 committed by GitHub
parent 5db7f7b3ac
commit 91c5ac44ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1177,11 +1177,12 @@ impl SourceSelector {
Self::from_sources([InterpreterSource::ManagedToolchain])
} else if env::var_os("UV_TEST_PYTHON_PATH").is_some() {
debug!(
"Only considering search path and active environments due to `UV_TEST_PYTHON_PATH`"
"Only considering search path, provided path, and active environments due to `UV_TEST_PYTHON_PATH`"
);
Self::from_sources([
InterpreterSource::ActiveEnvironment,
InterpreterSource::SearchPath,
InterpreterSource::ProvidedPath,
])
} else {
match system {