TypeScript
fix(dev): freeze the worktree setup lockfile (#19747)
mariab8e829dc8cbe
diff --git a/scripts/setup-worktree.ts b/scripts/setup-worktree.tsindex daf2f175aec..c56801c9c46 100644--- a/scripts/setup-worktree.ts+++ b/scripts/setup-worktree.ts@@ -21,7 +21,9 @@ const worktree = NodePath.dirname(import.meta.dirname);// `shell` resolves `vp` through PATH, including Windows command shims.// Setup has no one answering install prompts. Pass pnpm's confirmation flag// through vp and leave stdin closed so other prompts fail instead of hanging.-const install = NodeChildProcess.spawnSync("vp i -- --yes", {+// Install exactly the locked dependencies so setup never rewrites the lockfile.+// A stale lockfile must fail setup rather than silently resolving a new one.+const install = NodeChildProcess.spawnSync("vp i --frozen-lockfile -- --yes", {cwd: worktree,shell: true,stdio: ["ignore", "inherit", "inherit"],