diff --git a/src/importantinstalls/node.sh b/src/importantinstalls/node.sh index 64e1d8b..dc702df 100644 --- a/src/importantinstalls/node.sh +++ b/src/importantinstalls/node.sh @@ -10,8 +10,10 @@ if [[ $(which zsh) == "/usr/bin/zsh" ]]; then fi # always put in bashrc aswell, so that the user can always rely on the standard shell -sudo -u $SUDO_USER echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc -sudo -u $SUDO_USER echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc +cat >> ~/.bashrc << EOT +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +EOT source ~/.bashrc