Skip to content

Commit

Permalink
PostgreSQL: Validation and Installer parameters fix. (actions#1148)
Browse files Browse the repository at this point in the history
* Removed PostgreSQL server from path.
  • Loading branch information
Darleev authored Jun 30, 2020
1 parent e16e7a7 commit 64f438f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion images/win/scripts/Installers/Install-PostgreSQL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Set-SystemVariable -SystemVariable PGUSER -Value $pgUser
Set-SystemVariable -SystemVariable PGPASSWORD -Value $pgPwd

#Install latest PostgreSQL
Choco-Install -PackageName postgresql -ArgumentList "--params", "/Password:$pgPwd", "/NoPath", "--params-global", "--debug", "--verbose"
Choco-Install -PackageName postgresql -ArgumentList "--params", "'/Password:$pgPwd /NoPath'", "--params-global", "--debug", "--verbose"

#Get Path to pg_ctl.exe
$pgPath = (Get-CimInstance Win32_Service -Filter "Name LIKE 'postgresql-%'").PathName
Expand Down
2 changes: 1 addition & 1 deletion images/win/scripts/Installers/Validate-PostgreSQL.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$pgReadyPath = Join-Path $PGBIN "pg_isready.exe"
$pgReadyPath = Join-Path ${env:PGBIN} "pg_isready.exe"
$pgReady = Start-Process -FilePath $pgReadyPath -Wait -PassThru
$exitCode = $pgReady.ExitCode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ function Get-PostgreSQLMarkdown
$pgService = Get-CimInstance Win32_Service -Filter "Name LIKE 'postgresql-%'"
$pgPath = $pgService.PathName
$pgRoot = $pgPath.split('"')[1].replace("\bin\pg_ctl.exe", "")
$pgVersion = (pg_config --version).split()[1].Trim()
$env:Path += ";${env:PGBIN}"
$pgVersion = (postgres --version).split()[2].Trim()
$content = [PSCustomObject]@{
Version = $pgVersion
UserName = $env:PGUSER
Expand Down

0 comments on commit 64f438f

Please sign in to comment.