Skip to content

Commit

Permalink
Improve patchelf version parsing error message
Browse files Browse the repository at this point in the history
Closes #2382
  • Loading branch information
messense committed Dec 12, 2024
1 parent 83ebc23 commit 8d21fec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/auditwheel/patchelf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<semver::Version>()
.context("Failed to parse patchelf version")?;
let semver = version.parse::<semver::Version>().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
);
}
Expand Down

0 comments on commit 8d21fec

Please sign in to comment.