fix(utils): hide console window for hook dispatch on Windows - #7145
Open
code-yeongyu wants to merge 1 commit into
Open
fix(utils): hide console window for hook dispatch on Windows#7145code-yeongyu wants to merge 1 commit into
code-yeongyu wants to merge 1 commit into
Conversation
Add windowsHide: true to the main hook spawn in executeHookCommand(). On Windows, when the host process has no attached console (e.g. IDE extension / headless server), the child cmd.exe allocated a visible conhost window that flashed the Windows banner and echoed the raw hook JSON payload. The timeout taskkill spawn already uses windowsHide: true; this was an oversight on the main spawn. The option is a no-op on non-Windows. Closes #7144
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
Add
windowsHide: trueto the main hook spawn inexecuteHookCommand().On Windows, when the host process has no attached console (e.g. launched by an IDE extension or as a headless server), the child
cmd.exeallocated a visible conhost window that flashed the Windows banner and echoed the raw hook JSON payload.The timeout
taskkillspawn at line 158 already useswindowsHide: true; the omission on the main spawn was an oversight. The option is a no-op on non-Windows platforms.Changes
packages/utils/src/command-executor/execute-hook-command.ts: addwindowsHide: trueto spawn optionsCloses #7144
Summary by cubic
Hide the Windows console window during hook execution by setting windowsHide: true on the main spawn. Previously, on Windows without an attached console, a visible conhost flashed and echoed the raw hook JSON; now the window stays hidden, with no change on other platforms.
Notes
windowsHideis a no-op elsewhere.taskkillspawn, which already used this flag.Written for commit 15204e5. Summary will update on new commits.