Skip to content

Commit ec46ac8

Browse files
Merge pull request #7575 from thomasspriggs/tas/chocolate_error
Add error handling for exit code of Chocolatey
2 parents a202116 + 8ccaf19 commit ec46ac8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/pull-request-checks.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,11 @@ jobs:
611611
- name: Fetch dependencies
612612
run: |
613613
choco install winflexbison3
614+
if($LastExitCode -ne 0)
615+
{
616+
Write-Output "::error ::Dependency installation via Chocolatey failed."
617+
exit $LastExitCode
618+
}
614619
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
615620
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
616621
Invoke-WebRequest -Uri https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-win.zip -OutFile .\z3.zip
@@ -664,6 +669,11 @@ jobs:
664669
- name: Fetch dependencies
665670
run: |
666671
choco install -y winflexbison3 strawberryperl wget
672+
if($LastExitCode -ne 0)
673+
{
674+
Write-Output "::error ::Dependency installation via Chocolatey failed."
675+
exit $LastExitCode
676+
}
667677
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
668678
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
669679
echo "c:\ProgramData\chocolatey\bin" >> $env:GITHUB_PATH
@@ -731,6 +741,11 @@ jobs:
731741
- name: Fetch dependencies
732742
run: |
733743
choco install winflexbison3
744+
if($LastExitCode -ne 0)
745+
{
746+
Write-Output "::error ::Dependency installation via Chocolatey failed."
747+
exit $LastExitCode
748+
}
734749
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
735750
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
736751
- name: Setup Visual Studio environment

0 commit comments

Comments
 (0)