fix(cron): respect the platform-conditional decode design in _run_job_script + taskkill kwarg snapshot

cron/scheduler.py deliberately applies utf-8/replace only on Windows via
popen_kwargs (non-Windows keeps locale default per its test contract) —
drop the sweep's unconditional inline kwargs there. Update the gateway
force-kill kwarg snapshot for the new guard.
This commit is contained in:
teknium1 2026-07-24 11:21:14 -07:00 committed by Teknium
parent 804ce793de
commit 0f732cb3d6
2 changed files with 3 additions and 1 deletions

View file

@ -2301,7 +2301,7 @@ def _run_job_script(script_path: str) -> tuple[bool, str]:
result = subprocess.run(
argv,
capture_output=True,
text=True, encoding='utf-8', errors='replace',
text=True,
timeout=script_timeout,
cwd=str(path.parent),
env=env,

View file

@ -508,6 +508,8 @@ def test_gateway_force_kill_hides_taskkill_window(monkeypatch):
{
"capture_output": True,
"text": True,
"encoding": "utf-8",
"errors": "replace",
"timeout": 10,
"creationflags": _CREATE_NO_WINDOW,
},