{bash,zsh}rc & profile.d: fix if nvm condition

This commit is contained in:
Aminda Suomalainen 2024-07-28 09:50:57 +03:00
parent 15a8d5f9eb
commit c4b20f481d
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
3 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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