From 9e869d4652937536695416cac3757e26598aac13 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 11:44:59 +0000 Subject: fix(bundle): read Windows SystemRoot before copying the environment Co-Authored-By: Claude Opus 5.5 --- bundle/scripts/smoke-package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bundle') diff --git a/bundle/scripts/smoke-package.py b/bundle/scripts/smoke-package.py index 98ee52a..44f885f 100644 --- a/bundle/scripts/smoke-package.py +++ b/bundle/scripts/smoke-package.py @@ -9,7 +9,12 @@ import time root = Path(sys.argv[1]).resolve() environment = os.environ.copy() -environment["PATH"] = os.pathsep.join((os.path.join(environment["SystemRoot"], "System32"), environment["SystemRoot"])) if sys.platform == "win32" else "/nonexistent" +if sys.platform == "win32": + # Windows environ lookups ignore case; the copied dict has uppercase keys. + system_root = os.environ["SystemRoot"] + environment["PATH"] = os.pathsep.join((os.path.join(system_root, "System32"), system_root)) +else: + environment["PATH"] = "/nonexistent" with tempfile.TemporaryDirectory(prefix="cpsc bundle smoke ") as directory: work = Path(directory) if sys.platform == "win32": -- cgit v1.3.1-4-g156e