Commit 8edee0e
committed
Do not assume windows_build_command is a single line
`windows_build_command` was prefixed with a `Invoke-Program` to ensure
we catch errors, but this then misses multiline commands. Move
`Invoke-Program` up into the default command and then assume that it is
passed if a non-default command is used.
Note that `$ErrorActionPreference = 'Stop'` is not an option here - it
only stops for cmdlets, not native commands.
`$PSNativeCommandUseErrorActionPreference = $true` allows stopping on
native commands too, but that was only introduced in PowerShell 7.3.
windowsservercore-ltsc2022 has 5.1 by default (though we could install a
newer if we wanted to).
Update PR testing in this repo to use `Invoke-Program` to then actually
catch failures.1 parent 818776f commit 8edee0e
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
0 commit comments