From 8d21fec6b6d86f5c17f7392820eb4b8056a51711 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 12 Dec 2024 19:58:16 +0800 Subject: [PATCH] Improve patchelf version parsing error message Closes #2382 --- src/auditwheel/patchelf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/auditwheel/patchelf.rs b/src/auditwheel/patchelf.rs index a295b7adf..94b5b5bea 100644 --- a/src/auditwheel/patchelf.rs +++ b/src/auditwheel/patchelf.rs @@ -16,12 +16,12 @@ pub fn verify_patchelf() -> Result<()> { .trim() .to_string(); let version = version.strip_prefix("patchelf").unwrap_or(&version).trim(); - let semver = version - .parse::() - .context("Failed to parse patchelf version")?; + let semver = version.parse::().context( + "Failed to parse patchelf version, auditwheel repair requires patchelf >= 0.14.0.", + )?; if semver < semver::Version::new(0, 14, 0) { bail!( - "patchelf {} found. auditwheel repair requires patchelf >= 0.14.", + "patchelf {} found. auditwheel repair requires patchelf >= 0.14.0.", version ); }