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.fix/verification-admin-route-recovery
parent
2d978bf44a
commit
8dc0b18894
|
|
@ -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…
Reference in New Issue