From c66c68872782261ba43ee17aa67e83555bbe803e Mon Sep 17 00:00:00 2001 From: Teknium Date: Fri, 3 Apr 2026 01:03:46 -0700 Subject: [PATCH] fix: remove redundant restart message from update launchd path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit launchd_restart() already prints stop/start confirmation via its internal helpers — the extra 'Gateway restarted via launchd' line was redundant. Update test assertion to match. --- hermes_cli/main.py | 1 - tests/hermes_cli/test_update_gateway_restart.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hermes_cli/main.py b/hermes_cli/main.py index e3419c7297..e7ca539a90 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -3380,7 +3380,6 @@ def cmd_update(args): print("→ Restarting gateway service...") try: launchd_restart() - print("✓ Gateway restarted via launchd.") except subprocess.CalledProcessError as e: stderr = (getattr(e, "stderr", "") or "").strip() print(f"⚠ Gateway restart failed: {stderr}") diff --git a/tests/hermes_cli/test_update_gateway_restart.py b/tests/hermes_cli/test_update_gateway_restart.py index 9697dc7cb8..40511c8a20 100644 --- a/tests/hermes_cli/test_update_gateway_restart.py +++ b/tests/hermes_cli/test_update_gateway_restart.py @@ -312,7 +312,7 @@ class TestCmdUpdateLaunchdRestart: cmd_update(mock_args) captured = capsys.readouterr().out - assert "Gateway restarted via launchd" in captured + assert "Restarting gateway service" in captured assert "Restart it with: hermes gateway run" not in captured mock_launchd_restart.assert_called_once_with()