Skip to content

Commit 9664203

Browse files
committed
Check if the --print-sysroot call succeeded before evaluating the result
1 parent 81b4d8f commit 9664203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mbedtls-sys/build/bindgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl super::BuildConfig {
104104
if compiler.is_like_gnu() {
105105
let output = compiler.to_command().args(&["--print-sysroot"]).output();
106106
match output {
107-
Ok(sysroot) => {
107+
Ok(sysroot) if sysroot.status.success() => {
108108
let path = std::str::from_utf8(&sysroot.stdout).expect("Malformed sysroot");
109109
let trimmed_path = path
110110
.strip_suffix("\r\n")

0 commit comments

Comments
 (0)