Turn off wget's output in nvm_get_latest()
curl output is turned off by `-s` in the same place, we should unify the behavior on wget, also, this help removes those wget outputs that can't fit our coding style tests. cc #1739
This commit is contained in:
2
nvm.sh
2
nvm.sh
@@ -86,7 +86,7 @@ nvm_get_latest() {
|
||||
fi
|
||||
NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -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 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"
|
||||
NVM_LATEST_URL="$(wget -q http://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"
|
||||
else
|
||||
nvm_err 'nvm needs curl or wget to proceed.'
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user