Skip to content

Commit

Permalink
Fix maturin failing to handle empty sysroot
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed May 3, 2023
1 parent de44b26 commit ca97e16
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 ca97e16

Please sign in to comment.