Skip to content

Commit 3dcab29

Browse files
committed
rustbuild: format both Ok/Err separately, since Result doesn't do it
1 parent 84896c7 commit 3dcab29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/bin/rustc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ fn main() {
149149

150150
if let Some(mut on_fail) = on_fail {
151151
let e = match cmd.status() {
152-
Ok(s) if s.success() => std::process::exit(0),
153-
e => e,
152+
Ok(s) => if s.success() { std::process::exit(0) } else { format!("Ok({})", s) },
153+
Err(e) => format!("Err({})", e),
154154
};
155155
println!("\nDid not run successfully: {}\n{:?}\n-------------", e, cmd);
156156
status_code(&mut on_fail).expect("could not run the backup command");

0 commit comments

Comments
 (0)