File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 99# If RUSTUP_UPDATE_ROOT is unset or empty, default it.
1010RUSTUP_UPDATE_ROOT=" ${RUSTUP_UPDATE_ROOT:- https:// static.rust-lang.org/ rustup} "
1111
12+ ARCH=
13+
1214# XXX: If you change anything here, please make the same changes in setup_mode.rs
1315usage () {
1416 cat 1>&2 << EOF
@@ -46,17 +48,17 @@ main() {
4648 need_cmd rmdir
4749
4850 get_architecture || return 1
49- local _arch =" $RETVAL "
50- assert_nz " $_arch " " arch"
51+ ARCH =" $RETVAL "
52+ assert_nz " $ARCH " " arch"
5153
5254 local _ext=" "
53- case " $_arch " in
55+ case " $ARCH " in
5456 * windows* )
5557 _ext=" .exe"
5658 ;;
5759 esac
5860
59- local _url=" ${RUSTUP_UPDATE_ROOT} /dist/${_arch } /rustup-init${_ext} "
61+ local _url=" ${RUSTUP_UPDATE_ROOT} /dist/${ARCH } /rustup-init${_ext} "
6062
6163 local _dir
6264 _dir=" $( mktemp -d 2> /dev/null || ensure mktemp -d -t rustup) "
@@ -407,7 +409,7 @@ check_help_for() {
407409
408410 # If we're running on OS-X, older than 10.13, then we always
409411 # fail to find these options to force fallback
410- if check_cmd sw_vers; then
412+ if [[ $ARCH == * darwin * ]] && check_cmd sw_vers; then
411413 if [ " $( sw_vers -productVersion | cut -d. -f2) " -lt 13 ]; then
412414 # Older than 10.13
413415 echo " Warning: Detected OS X platform older than 10.13"
You can’t perform that action at this time.
0 commit comments