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);
}
}
}
}
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
if !help_on_error.is_empty() {
eprintln!("{}", help_on_error);
}
- std::process::exit(1);
+ crate::detail_exit(1);
}
}
"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");