Fix the Windows build by printing content logs as UTF-8.

The content step crashed on cp1252 because the summary line contains Czech characters.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-10-11 11:24:17 +02:00
commit 51101a93e2
3 changed files with 19 additions and 0 deletions

View file

@ -41,6 +41,8 @@ val buildContent = tasks.register<Exec>("buildContent") {
workingDir = repoRoot
val python = System.getenv("PYTHON")?.takeIf { it.isNotBlank() }
?: if (System.getProperty("os.name").startsWith("Windows")) "python" else "python3"
environment("PYTHONUTF8", "1")
environment("PYTHONIOENCODING", "utf-8")
commandLine(python, "scripts/build-content.py", "--out", out.path)
inputs.dir(repoRoot.resolve("content"))
inputs.file(repoRoot.resolve("scripts/build-content.py"))