E.g. #144995 (comment)
If we have neither command stdout nor stderr, then
|
fn fail(&self, message: &str, output: CommandOutput) -> ! { |
|
if self.is_verbose() { |
|
println!("{message}"); |
|
} else { |
|
let (stdout, stderr) = (output.stdout_if_present(), output.stderr_if_present()); |
|
// If the command captures output, the user would not see any indication that |
|
// it has failed. In this case, print a more verbose error, since to provide more |
|
// context. |
|
if stdout.is_some() || stderr.is_some() { |
|
if let Some(stdout) = output.stdout_if_present().take_if(|s| !s.trim().is_empty()) { |
|
println!("STDOUT:\n{stdout}\n"); |
|
} |
|
if let Some(stderr) = output.stderr_if_present().take_if(|s| !s.trim().is_empty()) { |
|
println!("STDERR:\n{stderr}\n"); |
|
} |
|
println!("Command has failed. Rerun with -v to see more details."); |
|
} else { |
|
println!("Command has failed. Rerun with -v to see more details."); |
|
} |
|
} |
|
exit!(1); |
|
} |
we only get the message
Command has failed. Rerun with -v to see more details.
which especially in CI, there's no indication as to what actually failed.
cc @Shourya742 (in case you're interested)
E.g. #144995 (comment)
If we have neither command stdout nor stderr, then
rust/src/bootstrap/src/utils/exec.rs
Lines 748 to 769 in dc0bae1
we only get the message
which especially in CI, there's no indication as to what actually failed.
cc @Shourya742 (in case you're interested)