Repository navigation
fix(util): hide plugin Git console windows on Windows - #55475
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
The fix looks right. I couldn't run it, because the bug only shows up on Windows and this sandbox is Linux. Instead I traced the code in the installed dependencies: pacote and @npmcli/git pass the whole options object to the Git spawn, so windowsHide: true reaches git ls-remote/clone in both the update check and Arborist install/update. bun test test/npm.test.ts and the util/core type checks pass.
Public API: unchanged.
The one concern is the new test (inline comment): it's heavy and brittle for a two-option fix and can be dropped.
Fixes #55457
neriousy
enabled auto-merge (squash)
October 14, 2026 16:57
neriousy
disabled auto-merge
October 14, 2026 18:21
1 task done
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
Closes #50868.
Closes #55457.
Related: #52299 (Git spawns during plugin install/reload), #52281, #52266, #53730, and #51887. This PR fixes OpenCode's npm-managed Git spawns; it does not change third-party plugin subprocess calls, snapshot/MCP spawning,
tasklist.exe, or plugin-install retry behavior.Pass
windowsHide: trueto Pacote's package checks and Arborist's install/update options. Their Git subprocesses bypassAppProcess, so a console-less background service otherwise opens a visible Windows Terminal/console window forgit ls-remoteand related Git operations. Pacote and@npmcli/gitforward this option to the underlying spawn.Verification
Npm.checkcode opened a visible Windows Terminal window titledC:\Program Files\Git\cmd\git.exefor the issue's unpinnedsuperpowersspec. A deliberately slow local HTTP Git remote kept its console visible for approximately 2.2 seconds. A full-commit-pinned control opened no window. No installed plugin configuration was changed or third-party plugin code executed; installed-revision metadata was seeded in a temporary cache.EnumWindows+IsWindowVisiblemonitoring detected zero console/Windows Terminal windows.windowsHideoption was independently removed and passed with both present. The probe is not included in this PR.bun test test/npm.test.tsfrompackages/core.bun run checkfrom the repository root.