Skip to content

Commit 9e14bd7

Browse files
committed
CI Win: fail early if build fails
Contrary to bash, GitHub CI pwsh doesn't stop on error but continues. This can be misleading because `cmake --install` is normally run even though `cmake --build` fails.
1 parent a7be406 commit 9e14bd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/ccpp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ jobs:
138138
Move-Item 'C:\glew-2.2.0' 'C:\glew'
139139
- name: Build
140140
run: |
141+
$ErrorActionPreference = 'Stop'
142+
$PSNativeCommandUseErrorActionPreference = $true
141143
#Set-PSDebug -Trace 1
142144
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
143145
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"

0 commit comments

Comments
 (0)