fix: resolve installer-owned npm through pnpm shell shims - #177
Merged
Merged
Conversation
2 tasks
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.
Change
Refs #173. Installer-owned updates fail when pnpm exposes npm through a shell shim whose CLI lives under
nodejs/<version>/lib/node_modules/npm/bin/npm-cli.js.Add a fallback that reads the literal CLI target from the pnpm shell shim without executing or sourcing it. All
execbranches must name the same supported target, and the resolved target must be a file inside that Node version's directory. The updater continues to invoke the CLI using its selected Node; existing receipt ownership checks, conventional npm symlinks, and Windows adjacentnpm.cmdlayouts are unchanged.Validation
update-application.test.tssuite (73 tests), including a real subprocess executing a synthetic npm CLI, paths containing spaces, multiple installed versions, conventional layouts, missing/invalid targets, dynamic paths, conflicting branches, and symlink escapes.git diff --checkandpnpm typecheck.pnpm verifyon clean commit4547174aabbdb668914f21007c7ccae969d88f80, full profile, macOS arm64 / Node 26.4.0 / pnpm 9.12.0; all 14 applicable gates passed, including build, capability tests, offline BYOK, policy and sandbox checks.Publication and contribution checks
Maintainer handoff
Publication scope or license changes: none.
Shared-source port: pending.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.