Repository navigation
[pull] main from pnpm:main - #491
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )