diff --git a/install.sh b/install.sh index 77f7f31..d47c57d 100755 --- a/install.sh +++ b/install.sh @@ -327,10 +327,10 @@ nvm_do_install() { local PROFILE_INSTALL_DIR PROFILE_INSTALL_DIR="$(nvm_install_dir | command sed "s:^$HOME:\$HOME:")" - SOURCE_STR="\\nexport NVM_DIR=\"${PROFILE_INSTALL_DIR}\"\\n[ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\" # This loads nvm\\n" + SOURCE_STR="\\nexport NVM_DIR=\"${PROFILE_INSTALL_DIR}\"\\n[ ! -s \"\$NVM_DIR/nvm.sh\" ] || \\. \"\$NVM_DIR/nvm.sh\" # This loads nvm\\n" # shellcheck disable=SC2016 - COMPLETION_STR='[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion\n' + COMPLETION_STR='[ ! -s "$NVM_DIR/bash_completion" ] || \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion\n' BASH_OR_ZSH=false if [ -z "${NVM_PROFILE-}" ] ; then