Skip to content
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

fix: remove curl option "--tcp-fastopen" which is not always available #299

Merged
merged 1 commit into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ download_git_output_processor() {

echo_info "Fetching git-process-output.zsh from $url"
if command -v curl > /dev/null 2>&1; then
curl --tcp-fastopen -fsSL -o "$script_path" "$url"
curl -fsSL -o "$script_path" "$url"
elif command -v wget > /dev/null 2>&1; then
wget -q -O "$script_path" "$url"
fi
Expand Down
4 changes: 2 additions & 2 deletions zinit-autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3019,9 +3019,9 @@ builtin print -Pr \"\$ZINIT[col-obj]Done (with the exit code: \$_retval).%f%b\""
if [[ "$user" != "_local" && -n "$user" ]]; then
builtin print "${ZINIT[col-info]}Creating Github repository${ZINIT[col-rst]}"
if [[ $isorg = (y|yes) ]]; then
curl --tcp-fastopen --silent -u "$user" https://api.github.com/orgs/$org/repos -d '{"name":"'"$plugin"'"}' >/dev/null
curl --silent -u "$user" https://api.github.com/orgs/$org/repos -d '{"name":"'"$plugin"'"}' >/dev/null
else
curl --tcp-fastopen --silent -u "$user" https://api.github.com/user/repos -d '{"name":"'"$plugin"'"}' >/dev/null
curl --silent -u "$user" https://api.github.com/user/repos -d '{"name":"'"$plugin"'"}' >/dev/null
fi
command git clone "https://github.com/${${${(M)isorg:#(y|yes)}:+$org}:-$user}/${plugin}.git" "${${${(M)isorg:#(y|yes)}:+$org}:-$user}---${plugin//\//---}" || {
builtin print "${ZINIT[col-error]}Creation of remote repository $uspl2col ${ZINIT[col-error]}failed${ZINIT[col-rst]}"
Expand Down
10 changes: 5 additions & 5 deletions zinit-install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {

if (( ${+commands[curl]} )); then
if [[ -n $progress ]]; then
command curl --tcp-fastopen --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
command curl --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
else
command curl --tcp-fastopen -fsSL "$url" || return 1
command curl -fsSL "$url" || return 1
fi
elif (( ${+commands[wget]} )); then
command wget ${${progress:--q}:#1} "$url" -O - || return 1
Expand All @@ -681,9 +681,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
} else {
if type curl 2>/dev/null 1>&2; then
if [[ -n $progress ]]; then
command curl --tcp-fastopen --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
command curl --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
else
command curl --tcp-fastopen -fsSL "$url" || return 1
command curl -fsSL "$url" || return 1
fi
elif type wget 2>/dev/null 1>&2; then
command wget ${${progress:--q}:#1} "$url" -O - || return 1
Expand Down Expand Up @@ -713,7 +713,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
}

if (( ${+commands[curl]} )) || type curl 2>/dev/null 1>&2; then
cmd=(command curl --tcp-fastopen -sIL "$url")
cmd=(command curl -sIL "$url")
elif (( ${+commands[wget]} )) || type wget 2>/dev/null 1>&2; then
cmd=(command wget --server-response --spider -q "$url" -O -)
else
Expand Down