Skip to content

Commit 60fb2e5

Browse files
committed
don't remove Cargo.lock for local paths
1 parent 37512d9 commit 60fb2e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/cargo-gpu/src/install.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ package = "rustc_codegen_spirv"
218218
.context("ensuring toolchain and components exist")?;
219219

220220
// to prevent unsupported version errors when using older toolchains
221-
log::debug!("remove Cargo.lock");
222-
std::fs::remove_file(checkout.join("Cargo.lock")).context("remove Cargo.lock")?;
221+
if !source_is_path {
222+
log::debug!("remove Cargo.lock");
223+
std::fs::remove_file(checkout.join("Cargo.lock")).context("remove Cargo.lock")?;
224+
}
223225

224226
crate::user_output!("Compiling `rustc_codegen_spirv` from source {}\n", source,);
225227
let mut build_command = std::process::Command::new("cargo");

0 commit comments

Comments
 (0)