Skip to content

Commit b15f482

Browse files
committed
Print out more from the response
1 parent 5b2a4c7 commit b15f482

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Resources/scripts/wait.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ wait_for_http() {
99
while [ "$(date +%s)" -lt "$end_time" ]; do # Loop until interval has elapsed.
1010
sleep 2
1111
echo "Checking $url"
12-
if [ "$(curl -s -o /dev/null -L -w '%{http_code}' "$url")" == "200" ]; then
12+
response=$(curl -s -L -w '\n%{http_code}' "$url")
13+
status_code=$(echo "$response" | tail -n1)
14+
if [ "$status_code" == "200" ]; then
1315
success='true'
1416
break
1517
fi
16-
echo "$(curl -s -o /dev/null -L -w '%{http_code}' "$url")"
18+
echo "$response" | head -n-1
1719
done
1820
if [ "$success" = 'true' ]; then
1921
exit 0

0 commit comments

Comments
 (0)