@@ -198,7 +198,7 @@ jobs:
198198 - name : Validate supporting PowerShell scripts syntax
199199 run : |
200200 Write-Host "Validating supporting PowerShell scripts..."
201- $Scripts = @("win/proxy- common-utils.ps1", "win/logging-utils.ps1", "win/env-prequisite-checks.ps1", "win/user-interaction.ps1", "win/env-setup-run.ps1")
201+ $Scripts = @("win/common-utils.ps1", "win/logging-utils.ps1", "win/env-prequisite-checks.ps1", "win/user-interaction.ps1", "win/env-setup-run.ps1")
202202 foreach ($Script in $Scripts) {
203203 $null = [System.Management.Automation.PSParser]::Tokenize((Get-Content $Script), [ref]$null)
204204 Write-Host "✅ $Script syntax is valid"
@@ -303,15 +303,22 @@ jobs:
303303
304304 Write-Host "✅ All integration tests completed"
305305
306- - name : Sync BrowserStack logs to workspace
306+ - name : Sync BrowserStack logs to workspace (Windows)
307307 if : always()
308+ shell : powershell
308309 run : |
309- mkdir -p ${{ github.workspace }}/bs-logs
310- if [ -d ~/.browserstack/NOW/logs ]; then
311- cp -R ~/.browserstack/NOW/logs/* ${{ github.workspace }}/bs-logs/ || true
312- else
313- echo "No logs found in ~/.browserstack/NOW/logs"
314- fi
310+ $dest = "${env:GITHUB_WORKSPACE}\bs-logs"
311+ New-Item -ItemType Directory -Force -Path $dest | Out-Null
312+
313+ $logPath = "${HOME}\.browserstack\NOW\logs"
314+
315+ if (Test-Path $logPath) {
316+ Write-Host "Copying logs from $logPath"
317+ Copy-Item -Path "$logPath\*" -Destination $dest -Recurse -Force -ErrorAction SilentlyContinue
318+ }
319+ else {
320+ Write-Host "No logs found at $logPath"
321+ }
315322
316323 - name : Upload BrowserStack Logs as Artifacts
317324 if : always()
0 commit comments