Skip to content

Commit

Permalink
Ignore py not found errors during interpreter discovery (#4620)
Browse files Browse the repository at this point in the history
Closes #4522
  • Loading branch information
zanieb authored Jun 29, 2024
1 parent 3a627f3 commit af9c2e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/uv-toolchain/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::downloads::PythonDownloadRequest;
use crate::implementation::{ImplementationName, LenientImplementationName};
use crate::interpreter::Error as InterpreterError;
use crate::managed::InstalledToolchains;
use crate::py_launcher::py_list_paths;
use crate::py_launcher::{self, py_list_paths};
use crate::toolchain::Toolchain;
use crate::virtualenv::{
conda_prefix_from_env, virtualenv_from_env, virtualenv_from_working_dir,
Expand Down Expand Up @@ -538,6 +538,11 @@ impl Error {
false
}
},
// Ignore `py` if it's not installed
Error::PyLauncher(py_launcher::Error::NotFound) => {
debug!("The `py` launcher could not be found to query for Python versions");
false
}
_ => true,
}
}
Expand Down

0 comments on commit af9c2e6

Please sign in to comment.