mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-31 01:45:50 +08:00
Make sure to ignore ~/.curlrc if it exists.
This commit is contained in:
4
nvm.sh
4
nvm.sh
@@ -20,7 +20,7 @@ nvm_is_alias() {
|
||||
nvm_get_latest() {
|
||||
local NVM_LATEST_URL
|
||||
if nvm_has "curl"; then
|
||||
NVM_LATEST_URL="$(curl -w "%{url_effective}\n" -L -s -S http://latest.nvm.sh -o /dev/null)"
|
||||
NVM_LATEST_URL="$(curl -q -w "%{url_effective}\n" -L -s -S http://latest.nvm.sh -o /dev/null)"
|
||||
elif nvm_has "wget"; then
|
||||
NVM_LATEST_URL="$(wget http://latest.nvm.sh --server-response -O /dev/null 2>&1 | awk '/^ Location: /{DEST=$2} END{ print DEST }')"
|
||||
else
|
||||
@@ -37,7 +37,7 @@ nvm_get_latest() {
|
||||
|
||||
nvm_download() {
|
||||
if nvm_has "curl"; then
|
||||
curl $*
|
||||
curl -q $*
|
||||
elif nvm_has "wget"; then
|
||||
# Emulate curl with wget
|
||||
ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \
|
||||
|
||||
Reference in New Issue
Block a user