Prevent fallback

master
Koen Punt 2014-03-26 09:16:26 +01:00
parent 6ed93f4c01
commit 2d0c025c49
1 changed files with 9 additions and 7 deletions

View File

@ -61,13 +61,15 @@ install_as_script() {
} }
if [ -z "$METHOD" ]; then if [ -z "$METHOD" ]; then
install_from_git || { # Autodetect install method
echo >&2 "Install using git failed, falling to back to script" if has "git"; then
install_as_script || { install_from_git
echo >&2 "You need git, curl or wget to install nvm" elif has "curl" || has "wget"; then
exit 1 install_as_script
} else
} echo >&2 "You need git, curl or wget to install nvm"
exit 1
fi
else else
if [ "$METHOD" = "git" ]; then if [ "$METHOD" = "git" ]; then
install_from_git || { install_from_git || {