From 96642038c3ff0d5eb0c4e64b82c323169a91ed44 Mon Sep 17 00:00:00 2001 From: Tobias Naumann Date: Thu, 4 May 2023 19:04:08 +0200 Subject: [PATCH] Check if the --print-sysroot call succeeded before evaluating the result --- mbedtls-sys/build/bindgen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mbedtls-sys/build/bindgen.rs b/mbedtls-sys/build/bindgen.rs index 7fd2fe2f6..b0f99f4c8 100644 --- a/mbedtls-sys/build/bindgen.rs +++ b/mbedtls-sys/build/bindgen.rs @@ -104,7 +104,7 @@ impl super::BuildConfig { if compiler.is_like_gnu() { let output = compiler.to_command().args(&["--print-sysroot"]).output(); match output { - Ok(sysroot) => { + Ok(sysroot) if sysroot.status.success() => { let path = std::str::from_utf8(&sysroot.stdout).expect("Malformed sysroot"); let trimmed_path = path .strip_suffix("\r\n")