mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-16 09:31:37 +00:00
fix: make profile subprocess HOME policy explicit
This commit is contained in:
parent
b00060ce54
commit
723c2331bd
16 changed files with 342 additions and 253 deletions
|
|
@ -1270,14 +1270,8 @@ def execute_code(
|
|||
child_env["TZ"] = _tz_name
|
||||
child_env.pop("HERMES_TIMEZONE", None)
|
||||
|
||||
# Per-profile HOME isolation: redirect system tool configs into
|
||||
# {HERMES_HOME}/home/ when that directory exists.
|
||||
from hermes_constants import get_subprocess_home
|
||||
_profile_home = get_subprocess_home()
|
||||
if _profile_home:
|
||||
child_env["HOME"] = _profile_home
|
||||
from hermes_constants import get_real_home
|
||||
child_env["HERMES_REAL_HOME"] = get_real_home()
|
||||
from hermes_constants import apply_subprocess_home_env
|
||||
apply_subprocess_home_env(child_env)
|
||||
|
||||
# Resolve interpreter + CWD based on execute_code mode.
|
||||
# - strict : today's behavior (sys.executable + tmpdir CWD).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue