[Fix] bypass aliased curl

Closes #2932
This commit is contained in:
ryenus
2023-01-10 15:32:47 +08:00
committed by Jordan Harband
parent 9142a92cdc
commit 0c1243a7ea
3 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ nvm_get_latest() {
if nvm_curl_use_compression; then
CURL_COMPRESSED_FLAG="--compressed"
fi
NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S https://latest.nvm.sh -o /dev/null)"
NVM_LATEST_URL="$(command curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S https://latest.nvm.sh -o /dev/null)"
elif nvm_has_executable "wget"; then
NVM_LATEST_URL="$(command wget -q https://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"
else