From ca97e16fd110e8892f70e4c28b2ea5adcf8adad1 Mon Sep 17 00:00:00 2001 From: roblabla Date: Wed, 3 May 2023 20:52:02 +0200 Subject: [PATCH] Fix maturin failing to handle empty sysroot --- src/auditwheel/audit.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/auditwheel/audit.rs b/src/auditwheel/audit.rs index 72c80dc43..ed628fb50 100644 --- a/src/auditwheel/audit.rs +++ b/src/auditwheel/audit.rs @@ -423,7 +423,11 @@ pub fn get_sysroot_path(target: &Target) -> Result { .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: {}",