mirror of https://github.com/astral-sh/uv
Lint
This commit is contained in:
parent
c08f658997
commit
3487c77de9
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)?)
|
||||
|
|
|
|||
Loading…
Reference in New Issue