Skip to content

fix: explicitly hide the console window to avoid it appearing in edge cases#40201

Open
RatinCN wants to merge 1 commit intoopenclaw:mainfrom
RatinCN:main
Open

fix: explicitly hide the console window to avoid it appearing in edge cases#40201
RatinCN wants to merge 1 commit intoopenclaw:mainfrom
RatinCN:main

Conversation

@RatinCN
Copy link
Copy Markdown

@RatinCN RatinCN commented Mar 8, 2026

Summary

A small and quick fix.

  • Problem: In very rare cases, the console window may appear. This has already happened before, either as repeated pop-ups that seriously disrupt use, or as a console window showing directly with the content netstat -ano | findstr /R /C:"...
  • What changed: set windowsHide: true for Windows, hide the console window explicitly.

Linked Issue/PR

User-visible / Behavior Changes

None`.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

@openclaw-barnacle openclaw-barnacle bot added cli CLI command changes size: XS labels Mar 8, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 8, 2026

Greptile Summary

This PR adds windowsHide: isWindows to the spawn options in runRestartScript (src/cli/update-cli/restart-helper.ts, line 170), explicitly suppressing the console window that cmd.exe would otherwise briefly surface when spawning the detached restart batch script on Windows.

  • The fix is minimal and precisely targeted — one additional option in the existing spawn call.
  • windowsHide: true on Windows tells Node.js's child_process.spawn to use the CREATE_NO_WINDOW creation flag, preventing any visible console window from appearing.
  • On non-Windows platforms the value evaluates to false, which is already the default, so there is zero behavioural change on Linux/macOS.
  • No security, permission, or network surface changes are introduced.

Confidence Score: 5/5

  • This PR is safe to merge — it is a single-line, low-risk fix with no logic changes outside of Windows console visibility.
  • The change is a one-liner that sets a well-documented Node.js spawn option (windowsHide) to true only on Windows. It has no effect on other platforms, introduces no new logic paths, and directly resolves the reported console window pop-up. There are no security, data, or network implications.
  • No files require special attention.

Last reviewed commit: e63dd5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: cmd.exe window flashes every ~30s from ARP network scanning

1 participant