mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-22 10:32:00 +00:00
refactor(cron): copy os.environ before sanitizing for subprocess
Matches the env= callsite convention at the other sanitized subprocess spawns (cua_backend dict(os.environ), gateway os.environ.copy()). Functionally equivalent — _sanitize_subprocess_env never mutates its input — but avoids handing the live mapping to the helper. Follow-up to salvaged PR #49207.
This commit is contained in:
parent
2d978bf44a
commit
8dc0b18894
1 changed files with 1 additions and 1 deletions
|
|
@ -1035,7 +1035,7 @@ def _run_job_script(script_path: str) -> tuple[bool, str]:
|
|||
text=True,
|
||||
timeout=script_timeout,
|
||||
cwd=str(path.parent),
|
||||
env=_sanitize_subprocess_env(os.environ),
|
||||
env=_sanitize_subprocess_env(os.environ.copy()),
|
||||
**popen_kwargs,
|
||||
)
|
||||
stdout = (result.stdout or "").strip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue