From 3dcab2922c4eaaea11a6856fa566bdb7a6d9c1f6 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Mon, 27 Jul 2020 22:44:48 +0100 Subject: [PATCH] rustbuild: format both Ok/Err separately, since Result doesn't do it --- src/bootstrap/bin/rustc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 9bb6dbc448d8c..f0cb7be96917b 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -149,8 +149,8 @@ fn main() { if let Some(mut on_fail) = on_fail { let e = match cmd.status() { - Ok(s) if s.success() => std::process::exit(0), - e => e, + Ok(s) => if s.success() { std::process::exit(0) } else { format!("Ok({})", s) }, + Err(e) => format!("Err({})", e), }; println!("\nDid not run successfully: {}\n{:?}\n-------------", e, cmd); status_code(&mut on_fail).expect("could not run the backup command");