Skip to content

Commit

Permalink
rustup-init.sh: Support Big Sur major version
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Silverstone <[email protected]>
  • Loading branch information
kinnison committed Dec 13, 2020
1 parent 4a2e283 commit c05d565
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 @@ -493,15 493,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 c05d565

Please sign in to comment.