This commit is contained in:
Zanie 2024-01-24 19:59:54 -06:00
parent c08f658997
commit 3487c77de9
2 changed files with 3 additions and 3 deletions

View File

@ -222,7 +222,7 @@ impl Interpreter {
"PUFFIN_PYTHON_PATH is set; ignoring system PATH when looking for binaries."
);
if let Ok(cwd) = std::env::current_dir() {
which::which_in(&requested, Some(isolated), cwd)
which::which_in(requested, Some(isolated), cwd)
.map_err(|err| Error::Which(requested.into(), err))
} else {
which::which_in_global(requested, Some(isolated))
@ -230,7 +230,7 @@ impl Interpreter {
.and_then(|mut paths| paths.next().ok_or(Error::PythonNotFound))
}
} else {
which::which(&requested).map_err(|err| Error::Which(requested.into(), err))
which::which(requested).map_err(|err| Error::Which(requested.into(), err))
}
}

View File

@ -49,7 +49,7 @@ pub fn find_requested_python(request: &str) -> Result<PathBuf, Error> {
}
} else if !request.contains(std::path::MAIN_SEPARATOR) {
// `-p python3.10`; Generally not used on windows because all Python are `python.exe`.
Interpreter::find_executable(&request)
Interpreter::find_executable(request)
} else {
// `-p /home/ferris/.local/bin/python3.10`
Ok(fs_err::canonicalize(request)?)