Commit a412cef
The `Windows Installer (Pester)` CI job began failing on the v0.8.9 release
commit although `install.ps1` and its tests were unchanged (the commit only
touched `CHANGELOG.md` and renamed a test). The same code passed on the two
prior pushes (#930, #946); the `windows-latest` runner image changed in
between, and a re-run reproduced the failure deterministically.
`Invoke-Installer` set `PROCESSOR_*` vars via `[Environment]::SetEnvironmentVariable`
(Process scope) on the Pester host and spawned `& pwsh -File`, relying on
inheritance. `PROCESSOR_ARCHITECTURE` is a loader-managed variable; the updated
runner re-initializes it for spawned processes, so the override no longer
reached the child (it arrived blank -> `Unsupported OS/Arch: windows/`). Custom
vars like `PROCESSOR_ARCHITEW6432` are unaffected, which is why the WOW64 test
kept passing.
Apply the requested env vars inside the child's own session via a `pwsh
-Command` preamble (after the loader runs), removing vars whose value is empty,
and pass the script args as bareword command-line tokens so parameter names
bind as names (matching the original `-File @ScriptArgs` semantics). Verified
green on windows-latest: 9/9 Pester tests pass.
This is a test-harness fix only - the shipped `install.ps1` and v0.8.9 binaries
are correct; real users always have a populated `PROCESSOR_ARCHITECTURE`.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8fea433 commit a412cef
1 file changed
Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
| |||
0 commit comments