Files
pnpm/pnpm11/exec
Zoltan Kochan 286d7ea37b fix(injected-deps-syncer): unlink a bin the script dropped (#13848)
Both stacks only ever created bin links. A build step that stopped
declaring a bin left its shim behind in every `.bin` the install had
written it to, pointing at a command that was no longer there.

Take the bin set from the manifest as it stood *before* the scripts ran
and unlink whatever the new manifest no longer declares. The copies
cannot answer that question themselves: their `package.json` is
hardlinked to the source, so a script that rewrites it in place has
already changed the copies too, and by sync time no record of the old
bins survives on disk. `pnpm run` already holds the pre-script manifest,
so it passes it down.

The install spreads an injected package's bins over three directories —
beside the copy, inside it, and the virtual store's hoisted `.bin` — and
this function had only ever written to the first. All three are cleared.
A stale name another package legitimately owns is put back by the relink
that follows, so removing first costs nothing.
2026-08-12 08:54:42 +02:00
..