Skip to content

Commit 970c9bb

Browse files
authored
fix: ensure toolchain components are installed, even if artifacts exist (#114)
1 parent e3c0cd1 commit 970c9bb

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

crates/cargo-gpu/src/install.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ package = "rustc_codegen_spirv"
264264
let target_spec_dir = update_target_specs_files(&source, &dummy_metadata, !skip_rebuild)
265265
.context("writing target spec files")?;
266266

267-
if !skip_rebuild {
268-
log::debug!("ensure_toolchain_and_components_exist");
269-
crate::install_toolchain::ensure_toolchain_and_components_exist(
270-
&toolchain_channel,
271-
self.auto_install_rust_toolchain,
272-
)
273-
.context("ensuring toolchain and components exist")?;
267+
log::debug!("ensure_toolchain_and_components_exist");
268+
crate::install_toolchain::ensure_toolchain_and_components_exist(
269+
&toolchain_channel,
270+
self.auto_install_rust_toolchain,
271+
)
272+
.context("ensuring toolchain and components exist")?;
274273

274+
if !skip_rebuild {
275275
// to prevent unsupported version errors when using older toolchains
276276
if !source.is_path() {
277277
log::debug!("remove Cargo.lock");

crates/cargo-gpu/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,8 @@ impl Command {
145145
command.build.watch = false;
146146
command.run()?;
147147
command.build.watch = true;
148-
command.run()?;
149-
} else {
150-
command.run()?;
151148
}
149+
command.run()?;
152150
}
153151
Self::Show(show) => show.run()?,
154152
Self::DumpUsage => dump_full_usage_for_readme()?,

0 commit comments

Comments
 (0)