diff --git a/install.sh b/install.sh index 6940171..41a8825 100755 --- a/install.sh +++ b/install.sh @@ -42,7 +42,7 @@ nvm_source() { 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 /' \ diff --git a/nvm.sh b/nvm.sh index dee8628..9ee539f 100755 --- a/nvm.sh +++ b/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 /' \ diff --git a/test/slow/nvm_get_latest/nvm_get_latest b/test/slow/nvm_get_latest/nvm_get_latest index f010e2c..3348fd5 100755 --- a/test/slow/nvm_get_latest/nvm_get_latest +++ b/test/slow/nvm_get_latest/nvm_get_latest @@ -10,12 +10,12 @@ cleanup() { EXPECTED_VERSION="v12.3.456" URL="https://github.com/creationix/nvm/releases/tag/$EXPECTED_VERSION" -EXPECTED_CURL_ARGS="-w %{url_effective}\n -L -s -S http://latest.nvm.sh -o /dev/null" +EXPECTED_CURL_ARGS="-q -w %{url_effective}\n -L -s -S http://latest.nvm.sh -o /dev/null" EXPECTED_WGET_ARGS="http://latest.nvm.sh --server-response -O /dev/null" curl() { if [ "_$*" != "_$EXPECTED_CURL_ARGS" ]; then - echo 2>& "expected args ($EXPECTED_CURL_ARGS), got ($*)" + echo >&2 "expected args ($EXPECTED_CURL_ARGS), got ($*)" return 1 else echo $URL @@ -23,7 +23,7 @@ curl() { } wget() { if [ "_$*" != "_$EXPECTED_WGET_ARGS" ]; then - echo 2>& "expected args ($EXPECTED_WGET_ARGS), got ($*)" + echo >&2 "expected args ($EXPECTED_WGET_ARGS), got ($*)" return 1 else local WGET_CONTENTS @@ -100,7 +100,7 @@ Saving to: ‘/dev/null’ " "$WGET_CONTENTS" | while read line do - 2>& echo "$line" + >&2 echo "$line" done fi }