mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Ignore Python discovery errors during uv python pin
(#13944)
See https://github.com/astral-sh/uv/issues/13935#issuecomment-2957300516 where we fail to write a pin file because we encounter an unusable interpreter. This is actually a special case where `MissingPython` is not raised because we want to show why we failed to find a usable interpreter, which is useful in commands where you _need_ an interpreter to use, but here we don't actually need it. Here, we just log the failure and move on. Related https://github.com/astral-sh/uv/pull/13936
This commit is contained in:
parent
28685633c0
commit
1b82a3ac99
1 changed files with 6 additions and 0 deletions
|
@ -110,6 +110,12 @@ pub(crate) async fn pin(
|
|||
warn_user_once!("{err}");
|
||||
None
|
||||
}
|
||||
// If there was some other error, log it
|
||||
Err(err) if !resolved => {
|
||||
debug!("{err}");
|
||||
None
|
||||
}
|
||||
// If `resolved` was requested, we must find an interpreter — fail otherwise
|
||||
Err(err) => return Err(err.into()),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue