Skip to content

Commit 39c9f18

Browse files
committed
Auto merge of #38233 - alexcrichton:more-errors, r=japaric
rustbuild: Print out failing commands Just ensure that we always print out the command line which should aid in debugging. Closes #38228
2 parents d53f39e + 03fb5ad commit 39c9f18

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/bootstrap/check.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ fn krate_emscripten(build: &Build,
465465
println!("running {}", test_file_name);
466466
let nodejs = build.config.nodejs.as_ref().expect("nodejs not configured");
467467
let mut cmd = Command::new(nodejs);
468-
cmd.arg(&test_file_name)
469-
.stderr(::std::process::Stdio::inherit());
468+
cmd.arg(&test_file_name);
470469
if build.config.quiet_tests {
471470
cmd.arg("--quiet");
472471
}

src/build_helper/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ pub fn run(cmd: &mut Command) {
2121
pub fn run_silent(cmd: &mut Command) {
2222
let status = match cmd.status() {
2323
Ok(status) => status,
24-
Err(e) => fail(&format!("failed to execute command: {}", e)),
24+
Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
25+
cmd, e)),
2526
};
2627
if !status.success() {
2728
fail(&format!("command did not execute successfully: {:?}\n\
@@ -63,7 +64,8 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
6364
pub fn output(cmd: &mut Command) -> String {
6465
let output = match cmd.stderr(Stdio::inherit()).output() {
6566
Ok(status) => status,
66-
Err(e) => fail(&format!("failed to execute command: {}", e)),
67+
Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
68+
cmd, e)),
6769
};
6870
if !output.status.success() {
6971
panic!("command did not execute successfully: {:?}\n\

0 commit comments

Comments
 (0)