From 82afe22f957abd7521b424a64b0d315730f2cde4 Mon Sep 17 00:00:00 2001 From: ryenus Date: Wed, 2 Nov 2022 11:28:34 +0800 Subject: [PATCH] bypass aliased curl --- install.sh | 2 +- nvm.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index f3f21299c96..da2be095683 100755 --- a/install.sh +++ b/install.sh @@ -90,7 +90,7 @@ nvm_node_version() { nvm_download() { if nvm_has "curl"; then - curl --fail --compressed -q "$@" + command curl --fail --compressed -q "$@" elif nvm_has "wget"; then # Emulate curl with wget ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \ diff --git a/nvm.sh b/nvm.sh index aebab932b65..6f6e31d3d84 100644 --- a/nvm.sh +++ b/nvm.sh @@ -87,7 +87,7 @@ nvm_has_colors() { } nvm_curl_libz_support() { - curl -V 2>/dev/null | nvm_grep "^Features:" | nvm_grep -q "libz" + command curl -V 2>/dev/null | nvm_grep "^Features:" | nvm_grep -q "libz" } nvm_curl_use_compression() { @@ -101,7 +101,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 "wget"; then NVM_LATEST_URL="$(wget -q https://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')" else @@ -121,7 +121,7 @@ nvm_download() { if nvm_curl_use_compression; then CURL_COMPRESSED_FLAG="--compressed" fi - curl --fail ${CURL_COMPRESSED_FLAG:-} -q "$@" + command 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 /' \ @@ -465,7 +465,7 @@ nvm_clang_version() { } nvm_curl_version() { - curl -V | command awk '{ if ($1 == "curl") print $2 }' | command sed 's/-.*$//g' + command curl -V | command awk '{ if ($1 == "curl") print $2 }' | command sed 's/-.*$//g' } nvm_version_greater() {