fix(browser): avoid bogus Chrome launch fallback

Detect an actual Chrome/Chromium executable before printing a manual CDP launch command, including common WSL-mounted Windows browser paths, so /browser connect does not suggest google-chrome when it is unavailable.
This commit is contained in:
Brooklyn Nicholson 2026-04-28 22:18:41 -05:00 committed by Teknium
parent f10a3df632
commit 69ff114ee2
5 changed files with 69 additions and 24 deletions

8
cli.py
View file

@ -6630,8 +6630,12 @@ class HermesCLI:
else:
print(" ⚠ Could not auto-launch Chrome")
sys_name = _plat.system()
print(f" Launch Chrome manually:")
print(f" {manual_chrome_debug_command(_port, sys_name)}")
chrome_cmd = manual_chrome_debug_command(_port, sys_name)
if chrome_cmd:
print(f" Launch Chrome manually:")
print(f" {chrome_cmd}")
else:
print(" No Chrome/Chromium executable found in this environment")
else:
print(f" ⚠ Port {_port} is not reachable at {cdp_url}")