diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-01-14 04:44:57 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-01-14 07:09:15 +0900 |
| commit | d975228cedeaab828e91ab72d4d6fb5ded324de8 (patch) | |
| tree | 85f8c4ab969bf2f7cfc94a89f1e25b48dcda6215 /src/bootstrap | |
| parent | af958046e5855a4254831102b502f57dafa40f69 (diff) | |
| download | rust-d975228cedeaab828e91ab72d4d6fb5ded324de8.tar.gz rust-d975228cedeaab828e91ab72d4d6fb5ded324de8.zip | |
Tweak assertion note in fmt
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/format.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/format.rs b/src/bootstrap/format.rs index 65b654fb519..6e5e3fe07e7 100644 --- a/src/bootstrap/format.rs +++ b/src/bootstrap/format.rs @@ -20,7 +20,15 @@ fn rustfmt(src: &Path, rustfmt: &Path, path: &Path, check: bool) { cmd.arg(&path); let cmd_debug = format!("{:?}", cmd); 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)] |
