Make install optional as probably not needed for next windows 2025 build

This commit is contained in:
lawrencegripper
2024-11-29 11:01:49 +00:00
parent 1acb48ed45
commit 3f89591af5
3 changed files with 12 additions and 8 deletions

View File

@@ -58,12 +58,14 @@ if ($null -ne ($toolsetVersion | Select-String -Pattern '\d+\.\d+\.\d+')) {
} while (!$response)
}
# Postgres 14 requires the vs 17 redistributable
$vs17RedistUrl = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
Install-Binary `
-Url $vs17RedistUrl `
-InstallArgs @("/install", "/quiet", "/norestart") `
-ExpectedSignature (Get-ToolsetContent).postgresql.vcRedistSignature
if ((Get-ToolsetContent).postgresql.installVcRedist) {
# Postgres 14 requires the vs 17 redistributable
$vs17RedistUrl = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
Install-Binary `
-Url $vs17RedistUrl `
-InstallArgs @("/install", "/quiet", "/norestart") `
-ExpectedSignature (Get-ToolsetContent).postgresql.vcRedistSignature
}
# Return the previous value of ErrorAction and invoke Install-Binary function
$ErrorActionPreference = $errorActionOldValue