File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ jobs:
6060 DB2_HOSTNAME : ${{ secrets.DB2_HOSTNAME }}
6161 DB2_PORT : ${{ secrets.DB2_PORT }}
6262 run : |
63+ $ErrorActionPreference = "Continue"
6364 Write-Host "Checking secrets are set..."
6465 Write-Host "DB2_DATABASE is set: $([bool]$env:DB2_DATABASE)"
6566 Write-Host "DB2_HOSTNAME is set: $([bool]$env:DB2_HOSTNAME)"
6667 Write-Host "DB2_PORT is set: $([bool]$env:DB2_PORT)"
6768 Write-Host "DB2_USER is set: $([bool]$env:DB2_USER)"
6869 Write-Host "DB2_PASSWD is set: $([bool]$env:DB2_PASSWD)"
6970 if (-not $env:DB2_DATABASE) {
70- Write-Error "DB2_DATABASE secret is not set! Go to repo Settings > Secrets > Actions and add it. "
71+ Write-Error "DB2_DATABASE secret is not set!"
7172 exit 1
7273 }
7374 Copy-Item config.py.sample config.py
7980 hostname = $env:DB2_HOSTNAME
8081 port = $port
8182 } | ConvertTo-Json
82- $json | Set-Content -Path config.json -Encoding UTF8
83+ # Write without BOM — Python's json.load fails on UTF-8 BOM
84+ [System.IO.File]::WriteAllText("$PWD\config.json", $json)
8385 Write-Host "config.json created:"
8486 Get-Content config.json
87+ Write-Host "config.json size: $((Get-Item config.json).Length) bytes"
8588
8689 - name : Write db2dsdriver.cfg into clidriver/cfg
8790 shell : powershell
You can’t perform that action at this time.
0 commit comments