Skip to content

Commit 39bc0c9

Browse files
committed
Restrict zsh shwordsplit to downloader()
1 parent a027d95 commit 39bc0c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rustup-init.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ has_local() {
1919

2020
has_local 2>/dev/null || alias local=typeset
2121

22-
# zsh does not split words by default, Required for curl retry arguments below.
23-
if [ -n "$ZSH_VERSION" ]; then
24-
setopt shwordsplit
25-
fi
26-
2722
set -u
2823

2924
# If RUSTUP_UPDATE_ROOT is unset or empty, default it.
@@ -575,6 +570,11 @@ ignore() {
575570
# This wraps curl or wget. Try curl first, if not installed,
576571
# use wget instead.
577572
downloader() {
573+
# zsh does not split words by default, Required for curl retry arguments below.
574+
if [ -n "$ZSH_VERSION" ]; then
575+
setopt local_options shwordsplit
576+
fi
577+
578578
local _dld
579579
local _ciphersuites
580580
local _err

0 commit comments

Comments
 (0)