Display error when unable to update

master
Koen Punt 2014-03-26 08:36:41 +01:00
parent 300022642a
commit c47f03f996
1 changed files with 4 additions and 1 deletions

View File

@ -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"