Stuck on psql command

Hello,

I’m using gitlab ci on a windows server 2022 with powershell.

I execute update.ps1 which runs sql scripts but the command is stuck.

it works on the machine but not via gitlab.

Start-Transcript -path update.log

Get-ChildItem . -Filter *.sql | ForEach-Object {
	$filename = $_.FullName
  
	Write-Host "`n$filename`n"
  
	psql -h localhost -p 5432 -U postgres -d myDB -f $filename
}

Stop-Transcript

exit $LASTEXITCODE

Do you know why please?

Thanks