From 9dbb346f9ed5b0fdf58ef8f7cf01fa99fa683f5c Mon Sep 17 00:00:00 2001 From: xian <117618147+xmujx@users.noreply.github.com> Date: Sat, 11 Apr 2026 14:44:09 +0000 Subject: [PATCH] fix(gateway): skip systemd check when systemctl is absent `supports_systemd_services()` unconditionally returns `True` on Linux, but Docker containers typically lack systemd/systemctl. This causes `hermes gateway setup` to crash with a `FileNotFoundError` when it tries to invoke `systemctl is-active`. Guard with `shutil.which("systemctl")` before assuming systemd support. --- hermes_cli/gateway.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hermes_cli/gateway.py b/hermes_cli/gateway.py index b29511dd59e0f..45d1cd097b3c9 100644 --- a/hermes_cli/gateway.py +++ b/hermes_cli/gateway.py @@ -317,6 +317,9 @@ def supports_systemd_services() -> bool: return False if is_wsl(): return _wsl_systemd_operational() + # Docker / container environments typically lack systemd + if shutil.which("systemctl") is None: + return False return True