mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(install): skip browser download when system chromium exists
This commit is contained in:
parent
7f08cb5941
commit
52521c937a
4 changed files with 173 additions and 54 deletions
|
|
@ -3381,8 +3381,8 @@ def _chromium_installed() -> bool:
|
|||
|
||||
1. ``AGENT_BROWSER_EXECUTABLE_PATH`` env var — the official way to point
|
||||
agent-browser at a pre-installed Chrome/Chromium.
|
||||
2. System Chrome/Chromium in PATH (``google-chrome``, ``chromium-browser``,
|
||||
``chrome``).
|
||||
2. System Chrome/Chromium in PATH (``google-chrome``, ``chromium``,
|
||||
``chromium-browser``, ``chrome``).
|
||||
3. Playwright's browser cache (current logic) — directories containing
|
||||
``chromium-*`` or ``chromium_headless_shell-*``.
|
||||
|
||||
|
|
@ -3405,7 +3405,12 @@ def _chromium_installed() -> bool:
|
|||
return True
|
||||
|
||||
# 2. System Chrome/Chromium in PATH (common names)
|
||||
system_chrome = shutil.which("google-chrome") or shutil.which("chromium-browser") or shutil.which("chrome")
|
||||
system_chrome = (
|
||||
shutil.which("google-chrome")
|
||||
or shutil.which("chromium")
|
||||
or shutil.which("chromium-browser")
|
||||
or shutil.which("chrome")
|
||||
)
|
||||
if system_chrome:
|
||||
_cached_chromium_installed = True
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue