[Robustness] use backslash when sourcing in case of overridden dot

Fixes #1278.
This commit is contained in:
Qiangjun Ran
2016-11-01 21:20:50 +08:00
committed by Jordan Harband
parent 942e9ab1f5
commit 2a2b8bdeb3
2 changed files with 3 additions and 3 deletions

View File

@@ -297,7 +297,7 @@ nvm_do_install() {
local INSTALL_DIR
INSTALL_DIR="$(nvm_install_dir)"
SOURCE_STR="\nexport NVM_DIR=\"$INSTALL_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\" # This loads nvm\n"
SOURCE_STR="\nexport NVM_DIR=\"$INSTALL_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\" # This loads nvm\n"
if [ -z "${NVM_PROFILE-}" ] ; then
echo "=> Profile not found. Tried ${NVM_PROFILE} (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."