Skip to content

Commit ff45424

Browse files
author
fack
committed
more comprehensive support
1 parent 5322439 commit ff45424

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rustup-init.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,10 @@ downloader() {
496496
echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure"
497497
if ! check_help_for "$3" curl --proto --tlsv1.2; then
498498
echo "Warning: Not enforcing TLS v1.2, this is potentially less secure"
499-
_err=$(curl --silent --show-error --fail --location "$1" --output "$2" 2>&1)
499+
_err=$(curl $_retry --silent --show-error --fail --location "$1" --output "$2" 2>&1)
500500
_status=$?
501501
else
502-
_err=$(curl --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1)
502+
_err=$(curl $_retry --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1)
503503
_status=$?
504504
fi
505505
fi
@@ -594,9 +594,10 @@ check_help_for() {
594594

595595
# Check if curl supports the --retry flag, then pass it to the curl invocation.
596596
check_curl_for_retry_support() {
597+
local _retry_supported=""
597598
# "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
598599
if check_help_for "notspecified" "curl" "--retry"; then
599-
local _retry_supported="--retry 3"
600+
_retry_supported="--retry 3"
600601
fi
601602

602603
RETVAL="$_retry_supported"

0 commit comments

Comments
 (0)