fix(ci): enable Python UTF-8 mode globally and enforce utf-8 encoding in subprocess verify scripts for Windows
This commit is contained in:
@@ -11,6 +11,7 @@ permissions:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
|
PYTHONUTF8: "1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ def run_extract(args: list[str]) -> str:
|
|||||||
[sys.executable, str(EXTRACT), *args],
|
[sys.executable, str(EXTRACT), *args],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
encoding="utf-8",
|
||||||
|
errors="replace",
|
||||||
)
|
)
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
fail(f"extractor exited {proc.returncode} for {args}: {proc.stderr.strip()}")
|
fail(f"extractor exited {proc.returncode} for {args}: {proc.stderr.strip()}")
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ def invoke(args: list[str]) -> subprocess.CompletedProcess[str]:
|
|||||||
[sys.executable, str(EXTRACT), *args],
|
[sys.executable, str(EXTRACT), *args],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
encoding="utf-8",
|
||||||
|
errors="replace",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user