Skip to content

Commit b645126

Browse files
authored
Merge pull request #1604 from lzutao/fix-local
Fix non-local variables in rustup-init
2 parents c39e791 + 4be2d2f commit b645126

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rustup-init.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222
#XXX: If you change anything here, please make the same changes in setup_mode.rs
2323
usage() {
2424
cat 1>&2 <<EOF
25-
rustup-init 1.0.0 (408ed84 2017-02-11)
25+
rustup-init 1.16.0 (beab5ac2b 2018-12-06)
2626
The installer for rustup
2727
2828
USAGE:
@@ -111,8 +111,6 @@ main() {
111111
exit 1
112112
fi
113113

114-
115-
116114
if [ "$need_tty" = "yes" ]; then
117115
# The installer is going to want to ask for confirmation by
118116
# reading stdin. This script was piped into `sh` though and
@@ -175,7 +173,7 @@ get_endianness() {
175173
}
176174

177175
get_architecture() {
178-
local _ostype _cputype
176+
local _ostype _cputype _bitness _arch
179177
_ostype="$(uname -s)"
180178
_cputype="$(uname -m)"
181179

@@ -283,7 +281,6 @@ get_architecture() {
283281
# only n64 ABI is supported for now
284282
_ostype="${_ostype}abi64"
285283
fi
286-
287284
_cputype="$(get_endianness "$_cputype" "" 'el')"
288285
;;
289286

@@ -378,6 +375,7 @@ ignore() {
378375
# This wraps curl or wget. Try curl first, if not installed,
379376
# use wget instead.
380377
downloader() {
378+
local _dld
381379
if check_cmd curl; then
382380
_dld=curl
383381
elif check_cmd wget; then

0 commit comments

Comments
 (0)