Skip to content

Commit bee8cb7

Browse files
authored
fix(script): Store cargo script lockfiles in build-dir (#16087)
### What does this PR try to resolve? `Cargo.lock` is not a final artifact, and so it should be in `build-dir`. This was missed when examining intermediate vs final artifacts for #14125. The downside is that if people decide to share a `build-dir` across projects, it will wreak havoc on their cargo script builds. I'll call this out in #12207 in case we want to re-visit this. ### How to test and review this PR?
2 parents 81c3f77 + cf2db59 commit bee8cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ impl<'gctx> Workspace<'gctx> {
668668

669669
fn default_lock_root(&self) -> Filesystem {
670670
if self.root_maybe().is_embedded() {
671-
self.target_dir()
671+
self.build_dir()
672672
} else {
673673
Filesystem::new(self.root().to_owned())
674674
}

0 commit comments

Comments
 (0)