chore: use explicit utf-8 for shell job files (#820)

This commit is contained in:
Rolly Calma
2026-06-02 10:12:13 +08:00
committed by GitHub
parent 784e60fc66
commit f65c89e02e
2 changed files with 5 additions and 4 deletions

View File

@@ -195,7 +195,7 @@ def refresh() -> Dict[str, Dict[str, Any]]:
exit_path = Path(rec.get("exit_path", ""))
if exit_path.exists():
try:
code = int(exit_path.read_text().strip() or "1")
code = int(exit_path.read_text(encoding="utf-8", errors="replace").strip() or "1")
except Exception:
code = 1
rec["exit_code"] = code