Skip to content

Commit e5b1ac6

Browse files
Copilotpelikhan
andauthored
fix: add curl connect-timeout and max-time to prevent hangs on Windows
The binary download and checksums download curl calls had no timeout options, causing them to hang indefinitely if a connection stalled. This was most visible on Windows GitHub Actions runners where the CI job ran for 3 hours before being killed. Add --connect-timeout 15 --max-time 120 to the binary download and --connect-timeout 15 --max-time 60 to the checksums download so the retry loop can cycle and eventually fail with a clear error instead of hanging forever. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1b540671-88f4-4de1-a709-01352e1f5788 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent d4d43bb commit e5b1ac6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

actions/setup-cli/install.sh

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install-gh-aw.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ MAX_RETRIES=3
286286
RETRY_DELAY=2
287287

288288
for attempt in $(seq 1 $MAX_RETRIES); do
289-
if curl -L -f -o "$BINARY_PATH" "$DOWNLOAD_URL"; then
289+
if curl -L -f --connect-timeout 15 --max-time 120 -o "$BINARY_PATH" "$DOWNLOAD_URL"; then
290290
print_success "Binary downloaded successfully"
291291
break
292292
else
@@ -308,7 +308,7 @@ if [ "$SKIP_CHECKSUM" = false ]; then
308308
CHECKSUMS_DOWNLOADED=false
309309

310310
for attempt in $(seq 1 $MAX_RETRIES); do
311-
if curl -L -f -o "$CHECKSUMS_PATH" "$CHECKSUMS_URL" 2>/dev/null; then
311+
if curl -L -f --connect-timeout 15 --max-time 60 -o "$CHECKSUMS_PATH" "$CHECKSUMS_URL" 2>/dev/null; then
312312
CHECKSUMS_DOWNLOADED=true
313313
print_success "Checksums file downloaded successfully"
314314
break

0 commit comments

Comments
 (0)