From c47f03f9969922174e05564d6604f4de652904b4 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Wed, 26 Mar 2014 08:36:41 +0100 Subject: [PATCH] Display error when unable to update --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 68fce91..be81d9c 100755 --- a/install.sh +++ b/install.sh @@ -30,7 +30,10 @@ install_from_git() { if [ -d "$NVM_DIR/.git" ]; then echo "=> NVM is already installed in $NVM_DIR, trying to update" echo -e "\r=> \c" - cd "$NVM_DIR" && git pull + cd "$NVM_DIR" && git pull 2> /dev/null || { + echo >&2 "Failed to update nvm, run 'git pull' in $NVM_DIR yourself.." + return 0 + } else # Cloning to $NVM_DIR mkdir -p "$NVM_DIR"