Compare commits

...

1 Commits

Author SHA1 Message Date
25ee7eb790 fix: expand tilde in get_hermes_home() when HERMES_HOME=~/... (#478)
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 1m5s
Path('~/foo') does NOT expand ~. When HERMES_HOME=~/custom-path,
get_hermes_home() returned a Path with literal ~ which broke
all downstream path resolution.

Fix: add .expanduser() to the return value.

Closes #478
2026-04-14 01:34:39 +00:00

View File

@@ -14,7 +14,7 @@ def get_hermes_home() -> Path:
Reads HERMES_HOME env var, falls back to ~/.hermes.
This is the single source of truth — all other copies should import this.
"""
return Path(os.getenv("HERMES_HOME", Path.home() / ".hermes"))
return Path(os.getenv("HERMES_HOME", str(Path.home() / ".hermes"))).expanduser()
def get_optional_skills_dir(default: Path | None = None) -> Path: