Skip to content

Commit

Permalink
Check if the --print-sysroot call succeeded before evaluating the result
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTobe committed May 4, 2023
1 parent 81b4d8f commit 9664203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mbedtls-sys/build/bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9664203

Please sign in to comment.