Github by default sets fail fast behaviour on pswh shell which means that if any powershell cmdlet fails the script will stop and exit. The problem is that this behaviour doesn’t apply when calling native executables, it only applies to powershell cmdlets.
I think the safest thing is to whenever we use pwsh to enable $PSNativeCommandUseErrorActionPreference = $true
which will also fail calling any exe that returns a non-zero exit code.
Technically the step Adjust paths in test/config.ini
only uses cmdlets so this step will not benefit from this change but I feel like it’s good practice to still enable this feature in case this script gets modified in the future to call an exe.
Here is a CI run that has a script that fails silently (look at Windows Native, VS 2022 -> Get tool information): https://github.com/m3dwards/bitcoin/actions/runs/15415032095/job/43375709475 And with this change applied, the script correctly fails: https://github.com/m3dwards/bitcoin/actions/runs/15416585565/job/43380685364