Skip to content

Commit

Permalink
Merge pull request #1589 from roblabla/fix-empty-sysroot
Browse files Browse the repository at this point in the history
Fix maturin failing to handle empty sysroot
  • Loading branch information
messense authored May 3, 2023
2 parents de44b26 + ca97e16 commit b1fd845
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ pub fn get_sysroot_path(target: &Target) -> Result<PathBuf> {
.context("Failed to read the sysroot path")?
.trim()
.to_owned();
return Ok(PathBuf::from(sysroot));
if sysroot.is_empty() {
return Ok(PathBuf::from("/"));
} else {
return Ok(PathBuf::from(sysroot));
}
} else {
bail!(
"Failed to get the sysroot path: {}",
Expand Down

0 comments on commit b1fd845

Please sign in to comment.