Tweak assertion note in fmt
This commit is contained in:
@@ -20,7 +20,15 @@ fn rustfmt(src: &Path, rustfmt: &Path, path: &Path, check: bool) {
|
|||||||
cmd.arg(&path);
|
cmd.arg(&path);
|
||||||
let cmd_debug = format!("{:?}", cmd);
|
let cmd_debug = format!("{:?}", cmd);
|
||||||
let status = cmd.status().expect("executing rustfmt");
|
let status = cmd.status().expect("executing rustfmt");
|
||||||
assert!(status.success(), "running {} successful", cmd_debug);
|
if !status.success() {
|
||||||
|
eprintln!(
|
||||||
|
"Running `{}` failed.\nIf you're running `tidy`, \
|
||||||
|
try again with `--bless` flag. Or, you just want to format \
|
||||||
|
code, run `./x.py fmt` instead.",
|
||||||
|
cmd_debug,
|
||||||
|
);
|
||||||
|
std::process::exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
|
|||||||
Reference in New Issue
Block a user