fix issue with x.py setup running into explicit panic

This commit is contained in:
Joshument 2022-10-01 18:51:10 -04:00
parent 56a35bc906
commit 8bba0de693

View File

@ -654,8 +654,6 @@ impl Build {
job::setup(self);
}
// Download rustfmt early so that it can be used in rust-analyzer configs.
let _ = &builder::Builder::new(&self).initial_rustfmt();
self.maybe_update_submodules();
if let Subcommand::Format { check, paths } = &self.config.cmd {
@ -670,6 +668,9 @@ impl Build {
return setup::setup(&self.config, *profile);
}
// Download rustfmt early so that it can be used in rust-analyzer configs.
let _ = &builder::Builder::new(&self).initial_rustfmt();
{
let builder = builder::Builder::new(&self);
if let Some(path) = builder.paths.get(0) {