Skip to content

Commit

Permalink
Update nvm.sh
Browse files Browse the repository at this point in the history
fix download
  • Loading branch information
Buguin committed May 31, 2023
1 parent a92d4e0 commit dc2b430
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,29 +115,6 @@ nvm_get_latest() {
nvm_echo "${NVM_LATEST_URL##*/}"
}

nvm_download_back() {
local CURL_COMPRESSED_FLAG
if nvm_has "curl"; then
if nvm_curl_use_compression; then
CURL_COMPRESSED_FLAG="--compressed"
fi
curl --fail ${CURL_COMPRESSED_FLAG:-} -q "$@"
elif nvm_has "wget"; then
# Emulate curl with wget
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
-e 's/--compressed //' \
-e 's/--fail //' \
-e 's/-L //' \
-e 's/-I /--server-response /' \
-e 's/-s /-q /' \
-e 's/-sS /-nv /' \
-e 's/-o /-O /' \
-e 's/-C - /-c /')
# shellcheck disable=SC2086
eval wget $ARGS
fi
}

#################################################################################
# The software package download function has the same function as nvm_download.
# this function will return the HTTP status after download file.If the download is successful,
Expand Down

0 comments on commit dc2b430

Please sign in to comment.