fix(delegation): recovery-hint git probe decodes output as utf-8 (Windows footgun)

This commit is contained in:
teknium1
2026-09-20 16:09:37 -07:00
committed by Teknium
parent a2b6f53245
commit 4f46bbfb92

View File

@@ -48,6 +48,7 @@ def git_state_hint(cwd: Optional[str]) -> Optional[str]:
def run(*args: str) -> Optional[str]:
try:
out = subprocess.run(["git", "-C", cwd, *args], capture_output=True, text=True,
encoding="utf-8", errors="replace",
stdin=subprocess.DEVNULL, timeout=_GIT_TIMEOUT_S)
except (OSError, subprocess.SubprocessError):
return None