Skip to content

Commit

Permalink
build.rs: print rustc stderr if exit status != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Apr 1, 2023
1 parent 68e06ad commit 88e27b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ fn rustc_minor_nightly() -> (u32, bool) {
.output()
.ok()
.expect("Failed to get rustc version");
if !output.status.success() {
let stderr = std::string::String::from_utf8_lossy(output.stderr.as_slice());
eprintln!("failed to run rustc: {stderr}");
}

let version = otry!(str::from_utf8(&output.stdout).ok());
let mut pieces = version.split('.');

Expand Down

0 comments on commit 88e27b8

Please sign in to comment.