Skip to content

Commit cdc08a2

Browse files
author
Paul C
committed
fix: show curl errors and increase download timeout for prebuilt binaries
1 parent e8c574d commit cdc08a2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

setup.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ download_prebuilt() {
6767
fi
6868
local url="https://github.com/${repo}/releases/latest/download/${binary}-${BINARY_ARCH}"
6969
echo " Downloading prebuilt ${binary} for ${BINARY_ARCH}..."
70-
if curl -fSL --connect-timeout 10 --max-time 120 -o "$dest" "$url" 2>/dev/null; then
70+
local tmpfile="${dest}.download"
71+
if curl -fSL --connect-timeout 15 --max-time 300 --retry 2 -o "$tmpfile" "$url" 2>&1; then
72+
mv "$tmpfile" "$dest"
7173
chmod +x "$dest"
7274
echo " ✓ Downloaded prebuilt ${binary} (${BINARY_ARCH})"
7375
return 0
7476
else
7577
echo " ⚠ Prebuilt binary not available — will build from source"
76-
rm -f "$dest"
78+
rm -f "$tmpfile"
7779
return 1
7880
fi
7981
}

0 commit comments

Comments
 (0)