fix: update dump file handling in install.ps1 to read content directly for PostgreSQL restoration

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-03 13:42:20 -08:00
parent 81fb1f327c
commit c2a8d43281

View file

@ -213,7 +213,7 @@ if ($MigrationMode) {
$restoreErrFile = Join-Path $env:TEMP "surfsense_restore_err.log"
Push-Location $InstallDir
Invoke-NativeSafe { docker compose exec -T -e "PGPASSWORD=$DbPass" db psql -U $DbUser -d $DbName < $DumpFilePath 2>$restoreErrFile } | Out-Null
Invoke-NativeSafe { Get-Content -LiteralPath $DumpFilePath | docker compose exec -T -e "PGPASSWORD=$DbPass" db psql -U $DbUser -d $DbName 2>$restoreErrFile | Out-Null } | Out-Null
Pop-Location
$fatalErrors = @()