fix(windows): use cross-spawn for shim-backed commands#18010
Merged
Hona merged 12 commits intoanomalyco:devfrom Mar 18, 2026
Merged
fix(windows): use cross-spawn for shim-backed commands#18010Hona merged 12 commits intoanomalyco:devfrom
Hona merged 12 commits intoanomalyco:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Routes Windows install detection and package-manager upgrade commands through a shell so .cmd/.bat shims resolve correctly, and improves visibility into npm-registry update checks via additional logging.
Changes:
- Forward
shellthroughProcess.run()soProcess.text()/Process.run()behave consistently when shell execution is required. - On Windows, run install-method detection and upgrade commands with
shell: truefor npm/pnpm/bun/choco/scoop. - Add info/error logging around npm-registry “latest version” lookups (including request URL and failure details).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/opencode/src/util/process.ts | Passes opts.shell from Process.run() down to spawn() so callers can reliably enable shell execution. |
| packages/opencode/src/installation/index.ts | Enables shell routing on Windows for detection/upgrades and adds registry lookup logging for update checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AvatarGanymede
pushed a commit
to AvatarGanymede/opencode-dev
that referenced
this pull request
Mar 19, 2026
demostanis
pushed a commit
to demostanis/opencode
that referenced
this pull request
Mar 19, 2026
raf1hh
pushed a commit
to raf1hh/opencode
that referenced
this pull request
Mar 20, 2026
demostanis
pushed a commit
to demostanis/opencode
that referenced
this pull request
Mar 20, 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.
The pain
.cmd/.bat) were failing across upgrade, uninstall, PR handoff, IDE install, and LSP launch.shell: truepapers over that, but it adds quoting and process-lifecycle problems.The solution
cross-spawninpackages/opencode/src/util/process.tsfor normal argv launches.Process.stop(...)for Windows teardown.Why it works
cross-spawnhandles Windows shim resolution and quoting without forcing shell semantics.Fixes
opencode uninstallshould work for chocolatey and scoop on windows #8573