mirror of https://github.com/astral-sh/uv
Treat empty `UV_TOOL_DIR` as unset (#12905)
Closes https://github.com/astral-sh/uv/issues/8608
This commit is contained in:
parent
318949ade6
commit
cac6560b4f
|
|
@ -74,7 +74,7 @@ impl InstalledTools {
|
|||
/// 2. A directory in the system-appropriate user-level data directory, e.g., `~/.local/uv/tools`
|
||||
/// 3. A directory in the local data directory, e.g., `./.uv/tools`
|
||||
pub fn from_settings() -> Result<Self, Error> {
|
||||
if let Some(tool_dir) = std::env::var_os(EnvVars::UV_TOOL_DIR) {
|
||||
if let Some(tool_dir) = std::env::var_os(EnvVars::UV_TOOL_DIR).filter(|s| !s.is_empty()) {
|
||||
Ok(Self::from_path(std::path::absolute(tool_dir)?))
|
||||
} else {
|
||||
Ok(Self::from_path(
|
||||
|
|
|
|||
Loading…
Reference in New Issue