fix(computer-use): hide the --no-overlay help probe console too

Follow-up to the #62821 salvage: the _cua_driver_supports_no_overlay
--help probe is another Windows-reachable spawn; give it the same
windows_hide_flags() treatment. Also adjust the status test to stub
_resolve_driver_cmd (permissions.py resolves via that helper, not
shutil.which).
This commit is contained in:
Teknium 2026-07-29 09:02:25 -07:00
parent b0a8775d66
commit 16720dc45b
2 changed files with 2 additions and 1 deletions

View file

@ -163,7 +163,7 @@ def test_windows_status_hides_every_reachable_subprocess(monkeypatch):
monkeypatch.setattr(permissions.sys, "platform", "win32")
monkeypatch.setattr(permissions, "windows_hide_flags", lambda: CREATE_NO_WINDOW)
monkeypatch.setattr(permissions.shutil, "which", lambda command: binary)
monkeypatch.setattr(permissions, "_resolve_driver_cmd", lambda command: binary)
monkeypatch.setattr(permissions.subprocess, "run", fake_run)
status = permissions.computer_use_status("cua-driver")

View file

@ -479,6 +479,7 @@ def _cua_driver_supports_no_overlay(driver_cmd: str) -> bool:
[driver_cmd, "--help"],
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3.0,
stdin=subprocess.DEVNULL,
creationflags=windows_hide_flags(),
env=_sanitize_subprocess_env(cua_driver_child_env()),
)
help_text = (proc.stdout or "") + (proc.stderr or "")