diff --git a/etc/profile.d/99-brew.sh b/etc/profile.d/99-brew.sh index a639a42b..a5d02e65 100644 --- a/etc/profile.d/99-brew.sh +++ b/etc/profile.d/99-brew.sh @@ -2,3 +2,9 @@ if [ -d /home/linuxbrew/.linuxbrew/bin ]; then eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) fi + +if [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then + export NVM_DIR=/home/linuxbrew/.nvm + [ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" # This loads nvm + [ -s "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion +fi diff --git a/rc/bashrc b/rc/bashrc index c31b039a..cf2e19a5 100755 --- a/rc/bashrc +++ b/rc/bashrc @@ -283,7 +283,7 @@ fi if [ -d ~/.nvm ]; then . ~/.nvm/nvm.sh . ~/.nvm/bash_completion -elif [ -f /home/linuxbrew/.linuxbrew/bin/nvm ]; then +elif [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then mkdir -p /home/linuxbrew/.nvm export NVM_DIR=/home/linuxbrew/.nvm [ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" # This loads nvm diff --git a/rc/zshrc b/rc/zshrc index 3a5dd8cb..16874a9d 100755 --- a/rc/zshrc +++ b/rc/zshrc @@ -237,7 +237,7 @@ fi if [ -d ~/.nvm ]; then . ~/.nvm/nvm.sh . ~/.nvm/bash_completion -elif [ -d /home/linuxbrew/.linuxbrew/bin/nvm ]; then +elif [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then mkdir -p /home/linuxbrew/.nvm export NVM_DIR=/home/linuxbrew/.nvm [ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" # This loads nvm