We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b2a4c7 commit b15f482Copy full SHA for b15f482
1 file changed
Resources/scripts/wait.sh
@@ -9,11 +9,13 @@ wait_for_http() {
9
while [ "$(date +%s)" -lt "$end_time" ]; do # Loop until interval has elapsed.
10
sleep 2
11
echo "Checking $url"
12
- if [ "$(curl -s -o /dev/null -L -w '%{http_code}' "$url")" == "200" ]; then
+ response=$(curl -s -L -w '\n%{http_code}' "$url")
13
+ status_code=$(echo "$response" | tail -n1)
14
+ if [ "$status_code" == "200" ]; then
15
success='true'
16
break
17
fi
- echo "$(curl -s -o /dev/null -L -w '%{http_code}' "$url")"
18
+ echo "$response" | head -n-1
19
done
20
if [ "$success" = 'true' ]; then
21
exit 0
0 commit comments