From 055fde40e0470ead938678702135a066008f960b Mon Sep 17 00:00:00 2001 From: ms-alan Date: Mon, 27 Apr 2026 00:02:56 +0800 Subject: [PATCH] fix(doctor): check global agent-browser when local install not found When agent-browser is globally installed via 'npm install -g agent-browser' but not present in the local node_modules, doctor falsely warns that it's not installed. Add shutil.which('agent-browser') as a fallback check after the local path check. Closes #15951 --- hermes_cli/doctor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hermes_cli/doctor.py b/hermes_cli/doctor.py index 7189b42ef4..446f576a61 100644 --- a/hermes_cli/doctor.py +++ b/hermes_cli/doctor.py @@ -935,6 +935,8 @@ def run_doctor(args): agent_browser_path = PROJECT_ROOT / "node_modules" / "agent-browser" if agent_browser_path.exists(): check_ok("agent-browser (Node.js)", "(browser automation)") + elif shutil.which("agent-browser"): + check_ok("agent-browser", "(browser automation)") else: if _is_termux(): check_info("agent-browser is not installed (expected in the tested Termux path)")