mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Treat empty UV_PYTHON_INSTALL_DIR
as unset (#12907)
Same as https://github.com/astral-sh/uv/pull/12905 — found via regex
This commit is contained in:
parent
cac6560b4f
commit
1988e209ef
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ impl ManagedPythonInstallations {
|
|||
pub fn from_settings(install_dir: Option<PathBuf>) -> Result<Self, Error> {
|
||||
if let Some(install_dir) = install_dir {
|
||||
Ok(Self::from_path(install_dir))
|
||||
} else if let Some(install_dir) = std::env::var_os(EnvVars::UV_PYTHON_INSTALL_DIR) {
|
||||
} else if let Some(install_dir) =
|
||||
std::env::var_os(EnvVars::UV_PYTHON_INSTALL_DIR).filter(|s| !s.is_empty())
|
||||
{
|
||||
Ok(Self::from_path(install_dir))
|
||||
} else {
|
||||
Ok(Self::from_path(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue