From 72e9dce23693ca470139d39656bf669ae738a75c Mon Sep 17 00:00:00 2001 From: sm Date: Sat, 4 Jul 2026 14:01:06 +0100 Subject: [PATCH] fix(hermes): respect $HERMES_HOME env var for profile-mode skills dir The Hermes integration hardcoded ''~/.hermes/skills/'', which breaks when Hermes runs under a non-default profile (where skills live under ''$HERMES_HOME/skills''). Check the HERMES_HOME environment variable first, falling back to ''~/.hermes/skills'' for the default (non-profile) install. --- src/specify_cli/integrations/hermes/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/specify_cli/integrations/hermes/__init__.py b/src/specify_cli/integrations/hermes/__init__.py index f4bc43be6e..17d41266f4 100644 --- a/src/specify_cli/integrations/hermes/__init__.py +++ b/src/specify_cli/integrations/hermes/__init__.py @@ -12,6 +12,7 @@ from __future__ import annotations +import os from pathlib import Path from shutil import rmtree from typing import Any @@ -55,7 +56,12 @@ class HermesIntegration(SkillsIntegration): @staticmethod def _hermes_home_skills_dir() -> Path: - """Return ``~/.hermes/skills/`` — the global skills directory.""" + """Return the Hermes skills directory, respecting ``$HERMES_HOME`` + for profile-mode installations. + """ + hermes_home = os.environ.get("HERMES_HOME") + if hermes_home: + return Path(hermes_home) / "skills" return Path.home() / ".hermes" / "skills" # -- Options -----------------------------------------------------------