mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-20 04:23:43 +00:00
Compare commits
2 Commits
e77b5437b2
...
c80b89720f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c80b89720f | ||
![]() |
4792d122b1 |
7
nvm.sh
7
nvm.sh
@ -128,7 +128,12 @@ nvm_download() {
|
|||||||
if nvm_curl_use_compression; then
|
if nvm_curl_use_compression; then
|
||||||
CURL_COMPRESSED_FLAG="--compressed"
|
CURL_COMPRESSED_FLAG="--compressed"
|
||||||
fi
|
fi
|
||||||
eval "curl -q --fail ${CURL_COMPRESSED_FLAG:-} ${CURL_HEADER_FLAG:-} $*"
|
local NVM_DOWNLOAD_ARGS
|
||||||
|
NVM_DOWNLOAD_ARGS=''
|
||||||
|
for arg in "$@"; do
|
||||||
|
NVM_DOWNLOAD_ARGS="${NVM_DOWNLOAD_ARGS} \"$arg\""
|
||||||
|
done
|
||||||
|
eval "curl -q --fail ${CURL_COMPRESSED_FLAG:-} ${CURL_HEADER_FLAG:-} ${NVM_DOWNLOAD_ARGS}"
|
||||||
elif nvm_has "wget"; then
|
elif nvm_has "wget"; then
|
||||||
# Emulate curl with wget
|
# Emulate curl with wget
|
||||||
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
|
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
|
||||||
|
@ -15,4 +15,6 @@ if nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/wrong_install
|
|||||||
die "nvm_download should fail to download no existing file"
|
die "nvm_download should fail to download no existing file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/install.sh" -o "; die quoted-command-not-quoted"
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user