Skip to content

Commit 308c9d4

Browse files
authored
fix: remove curl option "--tcp-fastopen" which is not always available (zdharma-continuum#299)
Signed-off-by: Vladislav Doster <[email protected]>
1 parent bcedc9f commit 308c9d4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

scripts/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ download_git_output_processor() {
106106

107107
echo_info "Fetching git-process-output.zsh from $url"
108108
if command -v curl > /dev/null 2>&1; then
109-
curl --tcp-fastopen -fsSL -o "$script_path" "$url"
109+
curl -fsSL -o "$script_path" "$url"
110110
elif command -v wget > /dev/null 2>&1; then
111111
wget -q -O "$script_path" "$url"
112112
fi

zinit-autoload.zsh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3019,9 +3019,9 @@ builtin print -Pr \"\$ZINIT[col-obj]Done (with the exit code: \$_retval).%f%b\""
30193019
if [[ "$user" != "_local" && -n "$user" ]]; then
30203020
builtin print "${ZINIT[col-info]}Creating Github repository${ZINIT[col-rst]}"
30213021
if [[ $isorg = (y|yes) ]]; then
3022-
curl --tcp-fastopen --silent -u "$user" https://api.github.com/orgs/$org/repos -d '{"name":"'"$plugin"'"}' >/dev/null
3022+
curl --silent -u "$user" https://api.github.com/orgs/$org/repos -d '{"name":"'"$plugin"'"}' >/dev/null
30233023
else
3024-
curl --tcp-fastopen --silent -u "$user" https://api.github.com/user/repos -d '{"name":"'"$plugin"'"}' >/dev/null
3024+
curl --silent -u "$user" https://api.github.com/user/repos -d '{"name":"'"$plugin"'"}' >/dev/null
30253025
fi
30263026
command git clone "https://github.com/${${${(M)isorg:#(y|yes)}:+$org}:-$user}/${plugin}.git" "${${${(M)isorg:#(y|yes)}:+$org}:-$user}---${plugin//\//---}" || {
30273027
builtin print "${ZINIT[col-error]}Creation of remote repository $uspl2col ${ZINIT[col-error]}failed${ZINIT[col-rst]}"

zinit-install.zsh

+5-5
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
662662

663663
if (( ${+commands[curl]} )); then
664664
if [[ -n $progress ]]; then
665-
command curl --tcp-fastopen --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
665+
command curl --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
666666
else
667-
command curl --tcp-fastopen -fsSL "$url" || return 1
667+
command curl -fsSL "$url" || return 1
668668
fi
669669
elif (( ${+commands[wget]} )); then
670670
command wget ${${progress:--q}:#1} "$url" -O - || return 1
@@ -681,9 +681,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
681681
} else {
682682
if type curl 2>/dev/null 1>&2; then
683683
if [[ -n $progress ]]; then
684-
command curl --tcp-fastopen --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
684+
command curl --progress-bar -fSL "$url" 2> >($ZINIT[BIN_DIR]/share/single-line.zsh >&2) || return 1
685685
else
686-
command curl --tcp-fastopen -fsSL "$url" || return 1
686+
command curl -fsSL "$url" || return 1
687687
fi
688688
elif type wget 2>/dev/null 1>&2; then
689689
command wget ${${progress:--q}:#1} "$url" -O - || return 1
@@ -713,7 +713,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
713713
}
714714

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

0 commit comments

Comments
 (0)