diff --git a/cli.py b/cli.py index 0c059450..408df5d5 100755 --- a/cli.py +++ b/cli.py @@ -3684,8 +3684,7 @@ class HermesCLI: self.agent.interrupt(interrupt_msg) # Debug: log to file (stdout may be devnull from redirect_stdout) try: - import pathlib as _pl - _dbg = _pl.Path.home() / ".hermes" / "interrupt_debug.log" + _dbg = _hermes_home / "interrupt_debug.log" with open(_dbg, "a") as _f: import time as _t _f.write(f"{_t.strftime('%H:%M:%S')} interrupt fired: msg={str(interrupt_msg)[:60]!r}, " @@ -3993,8 +3992,7 @@ class HermesCLI: self._interrupt_queue.put(payload) # Debug: log to file when message enters interrupt queue try: - import pathlib as _pl - _dbg = _pl.Path.home() / ".hermes" / "interrupt_debug.log" + _dbg = _hermes_home / "interrupt_debug.log" with open(_dbg, "a") as _f: import time as _t _f.write(f"{_t.strftime('%H:%M:%S')} ENTER: queued interrupt msg={str(payload)[:60]!r}, " diff --git a/tests/gateway/test_channel_directory.py b/tests/gateway/test_channel_directory.py index 74c95213..2ecacc45 100644 --- a/tests/gateway/test_channel_directory.py +++ b/tests/gateway/test_channel_directory.py @@ -203,7 +203,7 @@ class TestBuildFromSessions: }, }) - with patch.object(Path, "home", return_value=tmp_path): + with patch.dict(os.environ, {"HERMES_HOME": str(tmp_path)}): entries = _build_from_sessions("telegram") ids = {entry["id"] for entry in entries}