Repository navigation
Conversation
`vp install` prepended the selected Node.js bin directory with `dedupe_anywhere: true`. When that directory was already on PATH after another Node.js, it kept its position, so pnpm, engine checks, and lifecycle scripts used the other Node.js. Keep the existing position only for a system Node.js selected in system-first mode. Move a managed runtime to the front. Fixes voidzero-dev#3492
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffd83ba52c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Context
vp install#3492As reported in #3492, when a project uses Node.js 26 in managed mode and PATH already lists Node.js 24 before Node.js 26,
vp installends up running engine checks and lifecycle scripts with Node.js 24 instead of 26.Without this fix, users have to manually tweak their PATH or specify the version every time, for example by running
vp env exec --node 26.13.1 -- pnpm install. Otherwise, they might not even realize that these checks and scripts are silently running on the older version.This happens because
vp installprepends the selected bin directory using thededupe_anywhere: trueoption. Under this setting, any directory already present in PATH just keeps its existing spot. Since Node.js 26 was already listed after Node.js 24, it stayed behind, so looking upnodestill resolved to Node.js 24.This PR makes sure the selected bin directory is always moved to the front of PATH for managed runtimes. We left the behavior untouched for system-first mode, though, so we don't accidentally prioritize unrelated tools that might live in system directories.
I'll look into the discussion in #3591 (comment) in #3592.