Skip to content

Commit 7a87166

Browse files
committed
fix: wait up to 120s for Exegol, auto-create tmux when ready
1 parent 535be38 commit 7a87166

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

bin/dotsec

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,17 @@ __exegol_tmux_spawn() {
164164
local session_name="${2}"
165165
local load_cmd="${3:-}"
166166

167-
# Wait for container to be ready
167+
# Wait for container to be ready (up to 120s for first pull)
168+
printf '%b\n' " ${DIM}Waiting for Exegol container...${RESET}"
168169
local waited=0
169-
while ! docker exec "$container" true 2>/dev/null && [[ $waited -lt 30 ]]; do
170-
sleep 2; ((waited+=2))
170+
while ! docker exec "$container" true 2>/dev/null && [[ $waited -lt 120 ]]; do
171+
sleep 3; ((waited+=3))
172+
printf '.' >&2
171173
done
174+
echo ""
172175
if ! docker exec "$container" true 2>/dev/null; then
173-
printf '%b\n' " ${YELLOW}[!]${RESET} ${DIM}Exegol container not ready — skip tmux${RESET}" >&2
174-
printf '%b\n' " ${DIM}Attach later with:${RESET} ${YELLOW}dotsec tmux attach${RESET}" >&2
176+
printf '%b\n' " ${YELLOW}[!]${RESET} ${DIM}Exegol not ready after 2min — tmux will be created later${RESET}" >&2
177+
printf '%b\n' " ${DIM}Run${RESET} ${YELLOW}dotsec tmux attach${RESET} ${DIM}once container is up${RESET}" >&2
175178
return 0
176179
fi
177180

0 commit comments

Comments
 (0)