Skip to content

Commit

Permalink
Merge pull request #2607 from kinnison/fix-2606
Browse files Browse the repository at this point in the history
rustup-init.sh: Support Big Sur major version
  • Loading branch information
kinnison authored Dec 15, 2020
2 parents f5bbda8 + c05d565 commit fbfc454
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,27 @@ check_help_for() {

case "$_arch" in

# If we're running on OS-X, older than 10.13, then we always
# fail to find these options to force fallback
*darwin*)
if check_cmd sw_vers; then
if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then
# Older than 10.13
echo "Warning: Detected OS X platform older than 10.13"
return 1
fi
case $(sw_vers -productVersion) in
10.*)
# If we're running on macOS, older than 10.13, then we always
# fail to find these options to force fallback
if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then
# Older than 10.13
echo "Warning: Detected macOS platform older than 10.13"
return 1
fi
;;
11.*)
# We assume Big Sur will be OK for now
;;
*)
# Unknown product version, warn and continue
echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)"
echo "Warning TLS capabilities detection may fail"
;;
esac
fi
;;

Expand Down

0 comments on commit fbfc454

Please sign in to comment.