Skip to content

Commit dc2b430

Browse files
authored
Update nvm.sh
fix download
1 parent a92d4e0 commit dc2b430

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

nvm.sh

-23
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,6 @@ nvm_get_latest() {
115115
nvm_echo "${NVM_LATEST_URL##*/}"
116116
}
117117

118-
nvm_download_back() {
119-
local CURL_COMPRESSED_FLAG
120-
if nvm_has "curl"; then
121-
if nvm_curl_use_compression; then
122-
CURL_COMPRESSED_FLAG="--compressed"
123-
fi
124-
curl --fail ${CURL_COMPRESSED_FLAG:-} -q "$@"
125-
elif nvm_has "wget"; then
126-
# Emulate curl with wget
127-
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
128-
-e 's/--compressed //' \
129-
-e 's/--fail //' \
130-
-e 's/-L //' \
131-
-e 's/-I /--server-response /' \
132-
-e 's/-s /-q /' \
133-
-e 's/-sS /-nv /' \
134-
-e 's/-o /-O /' \
135-
-e 's/-C - /-c /')
136-
# shellcheck disable=SC2086
137-
eval wget $ARGS
138-
fi
139-
}
140-
141118
#################################################################################
142119
# The software package download function has the same function as nvm_download.
143120
# this function will return the HTTP status after download file.If the download is successful,

0 commit comments

Comments
 (0)