X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fbuilder.rs;h=fa6a5ee1668f8edf229af72c600e19cd35b03472;hb=06754d8852bea286a3a76d373ccd17e66afb5a8b;hp=dc6a0f6f241462e3519118f6caf7ffe71b6a9e1b;hpb=707c0d9a2d37da38b21222cd4b98e10a93a2643d;p=rust.git diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index dc6a0f6f241..fa6a5ee1668 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -346,11 +346,7 @@ fn run(v: &[StepDescription], builder: &Builder<'_>, paths: &[PathBuf]) { eprintln!( "note: if you are adding a new Step to bootstrap itself, make sure you register it with `describe!`" ); - #[cfg(not(test))] - std::process::exit(1); - #[cfg(test)] - // so we can use #[should_panic] - panic!() + crate::detail_exit(1); } } } @@ -953,6 +949,7 @@ pub(crate) fn fix_bin_or_dylib(&self, fname: &Path) { } pub(crate) fn download_component(&self, url: &str, dest_path: &Path, help_on_error: &str) { + self.verbose(&format!("download {url}")); // Use a temporary file in case we crash while downloading, to avoid a corrupt download in cache/. let tempfile = self.tempdir().join(dest_path.file_name().unwrap()); // While bootstrap itself only supports http and https downloads, downstream forks might @@ -1008,7 +1005,7 @@ fn download_http_with_retries(&self, tempfile: &Path, url: &str, help_on_error: if !help_on_error.is_empty() { eprintln!("{}", help_on_error); } - std::process::exit(1); + crate::detail_exit(1); } } @@ -1437,7 +1434,7 @@ pub fn cargo( "error: `x.py clippy` requires a host `rustc` toolchain with the `clippy` component" ); eprintln!("help: try `rustup component add clippy`"); - std::process::exit(1); + crate::detail_exit(1); }); if !t!(std::str::from_utf8(&output.stdout)).contains("nightly") { rustflags.arg("--cfg=bootstrap");