From f382b5240647b3251615e4d6b970db70ba73fdbd Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 10 Jun 2015 09:10:58 -0400 Subject: [PATCH] Prevent error when NVM is not installed --- zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index bd0a392..36547d7 100644 --- a/zshrc +++ b/zshrc @@ -65,9 +65,11 @@ fi export EDITOR='vim' # init rbenv -if test -d "$HOME/.rbenv/bin" ; then +if test -d "$HOME/.rbenv/bin"; then eval "$(rbenv init -)" fi # load nvm -[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" +if test -d "$NVM_DIR"; then + source "$NVM_DIR/nvm.sh" +fi