Skip to content

Commit de12a26

Browse files
authored
Merge pull request #1495 from crlf0710/master
Allow using inherited RUSTUP_UPDATE_ROOT variable in rustup-init.sh.
2 parents 25f476d + 71fb2df commit de12a26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rustup-init.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
set -u
1717

18-
RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup/dist"
18+
if [ -z "$RUSTUP_UPDATE_ROOT" ]; then
19+
RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
20+
fi
1921

2022
#XXX: If you change anything here, please make the same changes in setup_mode.rs
2123
usage() {
@@ -60,7 +62,7 @@ main() {
6062
;;
6163
esac
6264

63-
local _url="$RUSTUP_UPDATE_ROOT/$_arch/rustup-init$_ext"
65+
local _url="$RUSTUP_UPDATE_ROOT/dist/$_arch/rustup-init$_ext"
6466

6567
local _dir="$(mktemp -d 2>/dev/null || ensure mktemp -d -t rustup)"
6668
local _file="$_dir/rustup-init$_ext"

0 commit comments

Comments
 (0)