Don't exit when curl is failing to connect

This commit is contained in:
Arnaud 2025-05-30 11:59:49 +02:00
parent 09c4fa5300
commit 7a364b8a1f
No known key found for this signature in database
GPG Key ID: B8FBC178F10CA7AE

View File

@ -40,13 +40,12 @@ jobs:
echo "Waiting for $URL (timeout: ${TIMEOUT_SECONDS}s)..."
for i in $(seq 1 $MAX_RETRIES); do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL" || echo "000")
if [ "$STATUS" = "200" ]; then
echo "Codex is ready"
exit 0
fi
echo "Waiting... HTTP status: $STATUS"
sleep $SLEEP_INTERVAL
done