ci(win): only remove choco's cpack.exe if it exists

(cherry picked from commit ec0f4fab48)
This commit is contained in:
James McCoy
2021-10-31 08:42:30 -04:00
committed by github-actions[bot]
parent b60293b76d
commit 64ec1f5b02

View File

@@ -171,7 +171,9 @@ if (-not $NoTests) {
} }
# Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's # Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's
if (Get-Item -Path $env:ChocolateyInstall\bin\cpack.exe) {
Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force
}
# Build artifacts # Build artifacts
cpack -G ZIP -C RelWithDebInfo cpack -G ZIP -C RelWithDebInfo