fix(updater): spawn pnpm via cross-spawn so updates work on Windows - #8218
Merged
Merged
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoFix updater pnpm spawning on Windows
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Wuh9RTwTUHB7wxpNxrSiw
SamTV12345
force-pushed
the
fix/updater-pnpm-windows
branch
from
September 16, 2026 17:54
75b9df2 to
fd3cf9d
Compare
Member
|
Thanks for the addition :) |
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.
On Windows, the updater checks for pnpm and runs
pnpm install/pnpm run build:uiwithchild_process.spawn('pnpm', ...).pnpmis a.cmdshim on Windows, whichchild_process.spawncannot start without a shell (it fails withENOENT). As a result, on a git install created with the PowerShell installer from the README:pnpmOnPath()always resolvesfalse, so preflight fails withpnpm-not-foundeven though pnpm is installed;runStepinUpdateExecutor/RollbackHandler) would fail the same way.This uses
cross-spawn(already a dependency, used byutils/run_cmd.ts) for the pnpm check and as thespawnFnpassed to the executor and rollback handler.cross-spawnruns.cmdshims correctly on Windows and falls through tochild_process.spawnon other platforms, so behavior on Linux and macOS is unchanged. I preferred it overshell: true, which on Node 24 prints aDEP0190warning when combined with an args array.Testing
On Windows 11 / Node 24.14.0:
pnpmOnPathspawn call returnsfalse(ENOENT) withchild_process.spawnandtruewithcross-spawn.npx vitest run tests/backend-new/specs/updater(insrc): 18 files, 236 tests passing.npx tsc --noEmit: no errors.I did not run a full update end to end on Windows. Running
npx eslintinsrc(ESLint 10.10.0) fails for me with "couldn't find an eslint.config.* file" (the repo only hassrc/.eslintrc.cjs), so I could not lint the change locally.🤖 Generated with Claude Code
https://claude.ai/code/session_016Wuh9RTwTUHB7wxpNxrSiw