diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-21 11:44:59 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-21 11:44:59 +0000 |
| commit | 9e869d4652937536695416cac3757e26598aac13 (patch) | |
| tree | 3addd92be15161469f40eaae94b557bbbb8f96e7 /bundle/scripts | |
| parent | fcb9e2ef516cff0b6d5168bc6465e4615d2aa96e (diff) | |
fix(bundle): read Windows SystemRoot before copying the environment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bundle/scripts')
| -rw-r--r-- | bundle/scripts/smoke-package.py | 7 |
1 files changed, 6 insertions, 1 deletions
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": |
