[Fix] `install`: properly check for curl/wget

Jordan Harband 2021-11-25 14:26:35 -08:00
parent 30486b9bd9
commit 89379176ac
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 2 additions and 2 deletions

View File

@ -360,7 +360,7 @@ nvm_do_install() {
# Autodetect install method # Autodetect install method
if nvm_has git; then if nvm_has git; then
install_nvm_from_git install_nvm_from_git
elif nvm_has nvm_download; then elif nvm_has curl || nvm_has wget; then
install_nvm_as_script install_nvm_as_script
else else
nvm_echo >&2 'You need git, curl, or wget to install nvm' nvm_echo >&2 'You need git, curl, or wget to install nvm'
@ -373,7 +373,7 @@ nvm_do_install() {
fi fi
install_nvm_from_git install_nvm_from_git
elif [ "${METHOD}" = 'script' ]; then elif [ "${METHOD}" = 'script' ]; then
if ! nvm_has nvm_download; then if ! nvm_has curl || nvm_has wget; then
nvm_echo >&2 "You need curl or wget to install nvm" nvm_echo >&2 "You need curl or wget to install nvm"
exit 1 exit 1
fi fi