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

This commit is contained in:
James McCoy 2021-10-31 08:42:30 -04:00
parent 4da0351651
commit ec0f4fab48
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
1 changed files with 3 additions and 1 deletions

View File

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