Skip to content

Commit ed93413

Browse files
committed
curl add retry and filter wrong http code
1 parent 12295a4 commit ed93413

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

do-install/download-uncompress.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ function download() {
3535

3636
mkdir -p $(dirname "$dst")
3737
local tname="${dst}.tmp"
38-
curl -L "$MR_DOWNLOAD_URL" -o "$tname"
38+
curl -fL --retry 3 --retry-delay 5 --retry-max-time 30 "$MR_DOWNLOAD_URL" -o "$tname"
3939

4040
if [[ $? -eq 0 ]];then
4141
mv "$tname" "${dst}"
42+
else
43+
rm -f "$tname"
4244
fi
4345
}
4446

0 commit comments

Comments
 (0)