From 3d35a111ac8ad6ba5903ea5d891ffdbfe008d134 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 26 Aug 2026 09:08:02 -0500 Subject: [PATCH] Pin the compile locale in the generic pch flow too --- esphome/build_helpers/pch.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/esphome/build_helpers/pch.py b/esphome/build_helpers/pch.py index aff553a087..f6f03c4458 100644 --- a/esphome/build_helpers/pch.py +++ b/esphome/build_helpers/pch.py @@ -354,7 +354,14 @@ def prepare_pch( _log_pch_in_use() try: result = subprocess.run( - cmd, cwd=cmd_dir, capture_output=True, text=True, check=False, timeout=300 + cmd, + cwd=cmd_dir, + # C locale keeps diagnostics matchable by _TRANSIENT_ERRORS + env={**os.environ, "LC_ALL": "C"}, + capture_output=True, + text=True, + check=False, + timeout=300, ) error = None if result.returncode < 0: