Skip to content

Commit

Permalink
Ignore py not found errors during interpreter discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jun 28, 2024
1 parent 6b45c41 commit 25a3234
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 @@ -554,6 +554,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 25a3234

Please sign in to comment.