[rush] Preserve pnpm credential environment variables on POSIX - #6040
Merged
Ian Clanton-Thuon (iclanton) merged 3 commits intoSep 22, 2026
Conversation
Bypass the shell for package-manager invocations when the npmrc credential environment experiment is active. Preserve Windows command shims and default shell behavior for other callers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88399e18-c0da-4cfc-af47-6673b1cc1545
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88399e18-c0da-4cfc-af47-6673b1cc1545
Contributor
Author
|
Validation update for 8866cb5: all six CI jobs passed (Linux: Node 20/22/24/26; Windows: Node 24/26), and the CLA check passed. CI run: https://github.com/microsoft/rushstack/actions/runs/35648488938 Confirmed the first Windows Node 26 All five review comments have implementation replies. The repository-wide OS cache partitioning tradeoff remains documented for review; no threads were marked resolved on behalf of the reviewer. |
Ian Clanton-Thuon (iclanton)
approved these changes
Sep 22, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix missing pnpm registry authentication on POSIX when
provideNpmrcCredentialsViaEnvironmentis enabled.Follow-up to #5995: Rush creates URL-scoped
npm_config_*credential variables, but passing them through/bin/shcan discard them before pnpm starts. On Linux with dash, a clean install using pnpm 10.34.5 fails withERR_PNPM_FETCH_401and no Authorization header.Details
useShellexecution option, defaulting to existing shell behavior.rush-pnpm..cmdshims, default behavior for other callers, output handling, retries, and exit-code capture.temp/directory with node-core-libraryFileSystemhelpers, retaining the space-containing script path.[os]in the repository's cache-entry naming pattern so Linux, macOS, and Windows cannot reuse one another's test results. This repository-wide policy also partitions other phases' caches and prevents reuse of entries under the old naming pattern; it does not change shipped Rush cache defaults.How it was tested
Revalidated the review follow-up on September 21, 2026, on macOS with Node 22.21.1:
rush --quiet test --only @microsoft/rush-lib --include-phase-deps --parallelism 4: 931 tests passed, zero failures.rush change --verify --target-branch origin/main, Prettier checking all changed files, andgit diff --check origin/main...HEADpassed.CacheEntryId.parsePatternimplementation with simulatedprocess.platformvalues: identical project/phase/input hashes produce distinctlinux,darwin, andwin32keys. Verified the suite fixture was removed after execution.Prior Linux validation of the original implementation, recorded in the implementation handoff (production launcher unchanged by the review follow-up):
rush-pnpm outdatedand autoinstaller update authenticated successfully.The original PR head passed all six CI jobs, including Windows on Node 24 and 26; those results predate this follow-up. The manual Linux registry reproduction was not rerun on macOS. Windows was not executed locally; its existing shell path is unchanged and the POSIX-only argument test is skipped on Windows. Full legacy-install and cold autoinstaller-install integrations were not separately exercised.