Skip to content

Commit

Permalink
Addressing PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bekir-ozturk committed Feb 1, 2021
1 parent c9e5e27 commit e4f6983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -753,15 +753,17 @@ download() {
elif machine_has "wget"; then
downloadwget "$remote_path" "$out_path" || failed=true
else
failed = true
unset http_code
download_error_msg="Missing dependency: neither curl nor wget was found."
break
fi
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then
break
fi
say "Trying for the $((attempts+1))rd time in $((attempts*10)) seconds."
say "Download attempt #$attempts has failed: $http_code $download_error_msg"
say "Attempt #$((attempts+1)) will start in $((attempts*10)) seconds."
sleep $((attempts*20))
done
Expand Down

0 comments on commit e4f6983

Please sign in to comment.