From 7ffc92cf73de4351b8fed80dd51bea64b7058303 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 21 Mar 2024 19:48:18 +0300 Subject: [PATCH] make failure logs less verbose Signed-off-by: onur-ozkan --- src/bootstrap/src/lib.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 64bb7bf01f796..7fb4af460c34e 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -1008,16 +1008,19 @@ impl Build { }; let result = if !output.status.success() { if print_error { - println!( - "\n\ncommand did not execute successfully: {:?}\n\ - expected success, got: {}\n\n\ - stdout ----\n{}\n\ - stderr ----\n{}\n\n", - command.command, - output.status, - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - ); + println!("\n\nCommand did not execute successfully. Add `-v` to see more details."); + self.verbose(|| { + println!( + "\nCommand: {:?}\n\ + Expected success, got: {}\n\n\ + STDOUT ----\n{}\n\ + STDERR ----\n{}\n\n", + command.command, + output.status, + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ) + }); } Err(()) } else {