Merge pull request #11047 from lawrencegripper/lg/postgres-win-update

[Windows] Unpin Postgres allowing latest v14 version
This commit is contained in:
Lawrence Gripper
2025-01-21 12:30:37 +00:00
committed by GitHub
4 changed files with 36 additions and 7 deletions

View File

@@ -30,6 +30,10 @@ function Install-Binary {
.PARAMETER ExpectedSHA512Sum
The expected SHA512 sum of the binary. If specified, the binary's SHA512 sum is checked before installation.
.PARAMETER InstallerLogPath
The path to the log file which is produced when the installation fails. This can be used for debugging purposes.
This is only displayed when the installation fails.
.EXAMPLE
Install-Binary -Url "https://go.microsoft.com/fwlink/p/?linkid=2083338" -Type EXE -InstallArgs ("/features", "+", "/quiet") -ExpectedSignature "A5C7D5B7C838D5F89DDBEDB85B2C566B4CDA881F"
#>
@@ -46,7 +50,8 @@ function Install-Binary {
[String[]] $ExtraInstallArgs,
[String[]] $ExpectedSignature,
[String] $ExpectedSHA256Sum,
[String] $ExpectedSHA512Sum
[String] $ExpectedSHA512Sum,
[String] $InstallerLogPath
)
if ($PSCmdlet.ParameterSetName -eq "LocalPath") {
@@ -122,6 +127,15 @@ function Install-Binary {
} else {
Write-Host "Installation process returned unexpected exit code: $exitCode"
Write-Host "Time elapsed: $installCompleteTime seconds"
if ($InstallerLogPath) {
Write-Host "Searching for logs maching $InstallerLogPath pattern"
Get-ChildItem -Recurse -Path $InstallerLogPath | ForEach-Object {
Write-Output "Found Installer Log: $InstallerLogPath"
Write-Output "File content:"
Get-Content -Path $_.FullName
}
}
exit $exitCode
}
} catch {