Skip to content

Commit de51030

Browse files
committed
Amen PR comment, use curl instead of timeout
1 parent f0c7644 commit de51030

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/develop.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ CODER_DEV_SHIM="${PROJECT_ROOT}/scripts/coder-dev.sh"
6262
"${CODER_DEV_SHIM}" server --address 0.0.0.0:3000 || kill -INT -$$ &
6363

6464
echo '== Waiting for Coder to become ready'
65-
timeout 60s bash -c 'until curl -s --fail http://localhost:3000/healthz > /dev/null 2>&1; do sleep 0.5; done'
65+
curl --silent --fail --connect-timeout 1 --max-time 1 --retry 60 --retry-delay 1 --retry-max-time 60 --retry-all-errors 'http://localhost:3000/healthz' ||
66+
{
67+
echo '== ERROR: Coder did not become ready in time'
68+
kill -INT -$$
69+
}
6670

6771
# Check if credentials are already set up to avoid setting up again.
6872
"${CODER_DEV_SHIM}" list >/dev/null 2>&1 && touch "${PROJECT_ROOT}/.coderv2/developsh-did-first-setup"

0 commit comments

Comments
 (0)