Skip to content

Restrict zsh shwordsplit to downloader() #3508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ has_local() {

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

# zsh does not split words by default, Required for curl retry arguments below.
if [ -n "$ZSH_VERSION" ]; then
setopt shwordsplit
fi
is_zsh() {
[ -n "${ZSH_VERSION-}" ]
}

set -u

Expand Down Expand Up @@ -575,6 +574,9 @@ ignore() {
# This wraps curl or wget. Try curl first, if not installed,
# use wget instead.
downloader() {
# zsh does not split words by default, Required for curl retry arguments below.
is_zsh && setopt local_options shwordsplit

local _dld
local _ciphersuites
local _err
Expand Down