Skip to content

[pull] main from pnpm:main - #491

Merged
pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main
Aug 9, 2026
Merged

pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main

Conversation

@pull

@pull pull Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

zkochan and others added 4 commits August 9, 2026 21:30
…es (#13744)

Every command the suites spawn inherits the test process's environment, and
pnpm reads its settings from `PNPM_CONFIG_*` / `pnpm_config_*` and the npm
spellings. One such variable therefore reconfigures the pnpm under test:
`pnpm/setup` exports `PNPM_CONFIG_GLOBAL_SHIMS` to keep the runtime it
installed authoritative, which made `link_global_bins` write direct shims and
failed the global-shims assertions in CI. A contributor with a setting
exported in their shell hits the same class of failure locally.

Add `CommandTestExt::without_ambient_pnpm_config` and apply it where the
suites construct their commands, so a test is configured only by its own
`.npmrc` / workspace YAML plus whatever it sets on the command — an explicit
`env` still wins, because the removal happens at construction. Two suites
already hand-listed the variables they knew to strip; they now share the
helper.

The `packageManager` checks additionally run `exec node`, resolving `node`
from `PATH`. A context-aware global shim there honours the deliberately
unsatisfiable `devEngines.runtime` pin those fixtures declare and fails to
fetch it, so bypass the dispatcher for them. That failure already reproduces
on main for anyone whose global pnpm writes context-aware shims; CI has not
seen it because the pnpm it installs still writes direct ones.

The scrub covers the shared command constructors. The ad-hoc
`Command::cargo_bin("pnpm")` sites scattered through the suites still inherit
the ambient environment; closing those needs either a sweep of every call
site or a process-wide scrub, which would mean a new dependency and `unsafe`.
…13745)

A shim for a target with no interpreter — a managed runtime binary, or any
bin without a shebang — ran the target as a child of the shell and exited
with `$?`. A child killed by a signal makes the shell exit 128+N, so the
caller saw exit code 137 where the target had died on SIGKILL, and could no
longer tell a signal from an exit code.

`@zkochan/cmd-shim` execs on this arm and emits an unreachable `exit $?`
after it; the port kept only the trailing line and read it as deliberate.
Restore the `exec`, and keep the vestigial `exit $?` so the two stacks'
shims stay byte-identical.

The context-aware global shims made this reachable in more places: their
fallback re-enters the shim body with dispatch disabled, which is exactly
this arm, so any global runtime bin run with `globalShims` off converted
signal deaths into exit codes.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 9, 2026
@pull pull Bot added the ⤵️ pull label Aug 9, 2026
@pull
pull Bot merged commit 478aee6 into dwongdev:main Aug 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant