Skip to content

Commit

Permalink
pls god
Browse files Browse the repository at this point in the history
  • Loading branch information
chottuthejimmy committed Feb 14, 2025
1 parent 6d2f704 commit 8bd4c63
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ jobs:
Write-Output "Beginning port checks for $targetUrl"
while (-not $portLive) {
try {
$response = Invoke-WebRequest -Uri $targetUrl -Method Head -UseBasicParsing -TimeoutSec 2 -ErrorAction Stop
if ($response.StatusCode -eq 200 -or $response.StatusCode -eq 404) {
$portLive = $true
Write-Output "Port is live (HTTP 200)"
}
} catch {
$response = Invoke-WebRequest -Uri $targetUrl -Method Head -UseBasicParsing -TimeoutSec 2 -ErrorAction Stop
if ($response.StatusCode -eq 200 -or $response.StatusCode -eq 404) {
$portLive = $true
Write-Output "Port is live (HTTP 200)"
} else {
Write-Output "Port is not live (HTTP $($response.StatusCode))"
Start-Sleep -Seconds 1
}
}
Expand Down

0 comments on commit 8bd4c63

Please sign in to comment.