fix: hide the background updater console window on Windows - #1336
Merged
Conversation
A detached Windows child gets its own console window. With the shell: true introduced for the CVE-2024-27980 fix, a passive background auto-update could flash a command window even though stdio is ignored. Set windowsHide on the detached background child so the silent updater stays silent. The foreground `kimi upgrade` path is interactive (stdio: inherit, non-detached) and reuses the parent console, so it is left unchanged.
🦋 Changeset detectedLatest commit: 3451f97 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
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.
Related Issue
Follow-up to #1332, addressing a review comment on the Windows upgrade fix.
Problem
#1332 made the Windows upgrade/auto-update spawn the package-manager
.cmdshim through a shell (shell: true) to avoidspawn EINVAL. The background auto-update path runs that shell withdetached: trueand the defaultwindowsHide: false. On Windows a detached child gets its own console window, so a passive background update could flash a command window even thoughstdiois ignored — defeating the silent updater.What changed
Set
windowsHide: trueonwin32for the detached background install spawn only, so the silent updater stays silent. The foregroundkimi upgradepath is interactive (stdio: inherit, non-detached) and reuses the parent console, so it does not pop a window and is left unchanged. Added a win32 test covering the background spawn options, plus a changeset.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.