Skip to content

Commit fbfc454

Browse files
authored
Merge pull request #2607 from kinnison/fix-2606
rustup-init.sh: Support Big Sur major version
2 parents f5bbda8 + c05d565 commit fbfc454

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

rustup-init.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,15 +500,27 @@ check_help_for() {
500500

501501
case "$_arch" in
502502

503-
# If we're running on OS-X, older than 10.13, then we always
504-
# fail to find these options to force fallback
505503
*darwin*)
506504
if check_cmd sw_vers; then
507-
if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then
508-
# Older than 10.13
509-
echo "Warning: Detected OS X platform older than 10.13"
510-
return 1
511-
fi
505+
case $(sw_vers -productVersion) in
506+
10.*)
507+
# If we're running on macOS, older than 10.13, then we always
508+
# fail to find these options to force fallback
509+
if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then
510+
# Older than 10.13
511+
echo "Warning: Detected macOS platform older than 10.13"
512+
return 1
513+
fi
514+
;;
515+
11.*)
516+
# We assume Big Sur will be OK for now
517+
;;
518+
*)
519+
# Unknown product version, warn and continue
520+
echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)"
521+
echo "Warning TLS capabilities detection may fail"
522+
;;
523+
esac
512524
fi
513525
;;
514526

0 commit comments

Comments
 (0)