From f8bf40b18b4c3e15b848a1fd3c4fbc5b67ae6ef4 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 16 Jul 2026 00:26:37 -0700 Subject: [PATCH] fix(photon): hide the npm dep self-heal console flashes on Windows too Widen @lEWFkRAD's sidecar-headless fix (PR #54565) to the sibling spawn sites: the npm ci / npm install self-heal runs in _reinstall_sidecar_deps also popped a brief console window per run on Windows. Same windows_hide_flags() helper (CREATE_NO_WINDOW only, so capture_output stays usable). --- plugins/platforms/photon/adapter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/platforms/photon/adapter.py b/plugins/platforms/photon/adapter.py index 4dfe7ffc6df4..29f490290437 100644 --- a/plugins/platforms/photon/adapter.py +++ b/plugins/platforms/photon/adapter.py @@ -174,6 +174,10 @@ def _reinstall_sidecar_deps() -> None: if not npm: logger.warning("[photon] cannot reinstall stale sidecar deps: npm not on PATH") return + # Windows: suppress the console flash these short-lived npm runs would + # otherwise pop (0 elsewhere). Same helper as the sidecar spawn below. + from hermes_cli._subprocess_compat import windows_hide_flags + try: result = subprocess.run( # noqa: S603 [npm, "ci"], @@ -182,6 +186,7 @@ def _reinstall_sidecar_deps() -> None: text=True, check=False, timeout=_NPM_REINSTALL_TIMEOUT, + creationflags=windows_hide_flags(), ) if result.returncode != 0: logger.warning( @@ -194,6 +199,7 @@ def _reinstall_sidecar_deps() -> None: text=True, check=False, timeout=_NPM_REINSTALL_TIMEOUT, + creationflags=windows_hide_flags(), ) except subprocess.TimeoutExpired: # A wedged npm (dead registry, network blackhole) must not stall the