mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tui): use PROJECT_ROOT instead of cwd for HERMES_ROOT fallback
When HERMES_ROOT was added for Nix-bundled TUI support, the fallback was set to os.getcwd(). This overrode the TUI's own import.meta.dirname resolution, so launching `hermes --tui` from outside the repo caused the gateway client to look for venv/bin/python relative to the user's working directory instead of the repo root. Use PROJECT_ROOT (resolved from the source file location) as the fallback, which is stable regardless of where the command is invoked.
This commit is contained in:
parent
660379637a
commit
294c377c0c
1 changed files with 1 additions and 1 deletions
|
|
@ -663,7 +663,7 @@ def _launch_tui(resume_session_id: Optional[str] = None):
|
|||
tui_dir = PROJECT_ROOT / "ui-tui"
|
||||
|
||||
env = os.environ.copy()
|
||||
env["HERMES_ROOT"] = os.environ.get("HERMES_ROOT", os.getcwd())
|
||||
env["HERMES_ROOT"] = os.environ.get("HERMES_ROOT", str(PROJECT_ROOT))
|
||||
if resume_session_id:
|
||||
env["HERMES_TUI_RESUME"] = resume_session_id
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue