mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-14 16:55:01 +00:00
Catch broken mac_ver()
(#11396)
A user reported a homebrew Python that would raise an exception in the interpreter probing script because `platform.mac_ver()` returned `('', ('', '', ''), '')` on his installation due to https://github.com/Homebrew/homebrew-core/issues/206778 This is easy enough to catch and show a proper error message instead of the Python backtrace.
This commit is contained in:
parent
ca49495e4b
commit
ddbc6e3150
2 changed files with 8 additions and 2 deletions
|
@ -698,6 +698,8 @@ enum InterpreterInfoResult {
|
|||
pub enum InterpreterInfoError {
|
||||
#[error("Could not detect a glibc or a musl libc (while running on Linux)")]
|
||||
LibcNotFound,
|
||||
#[error("Broken Python installation, `platform.mac_ver()` returned an empty value, please reinstall Python")]
|
||||
BrokenMacVer,
|
||||
#[error("Unknown operating system: `{operating_system}`")]
|
||||
UnknownOperatingSystem { operating_system: String },
|
||||
#[error("Python {python_version} is not supported. Please use Python 3.8 or newer.")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue