Skip to content

Commit 251eba0

Browse files
ckhordiasmaclaude
andcommitted
fix: use --manifest-path explicitly in cargo update
Pass --manifest-path to `cargo update --workspace` instead of relying on current_dir + cargo's upward search, matching the pattern used by cargo_package_file_list in the same file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 15481aa commit 251eba0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/source_distribution/mod.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,10 @@ fn regenerate_cargo_lock(
772772
// which silently floats third-party pins and breaks reproducibility.
773773
// `update --workspace` conservatively preserves existing pins while
774774
// pruning entries for packages no longer reachable from the workspace.
775+
let manifest_path = sdist_dir.join("Cargo.toml");
775776
let mut cmd = Command::new("cargo");
776-
cmd.args(["update", "--workspace"]).current_dir(&sdist_dir);
777+
cmd.args(["update", "--workspace", "--manifest-path"])
778+
.arg(&manifest_path);
777779
if ctx.project.cargo_options.offline {
778780
cmd.arg("--offline");
779781
}

0 commit comments

Comments
 (0)