From e54f4f16896f4f9e2426184dab11e86f1fd72e87 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sun, 28 Jul 2024 11:52:51 +0300 Subject: [PATCH] fix 99-brew.sh in profile.d as well --- etc/profile.d/99-brew.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/profile.d/99-brew.sh b/etc/profile.d/99-brew.sh index a5d02e65..963f7299 100644 --- a/etc/profile.d/99-brew.sh +++ b/etc/profile.d/99-brew.sh @@ -3,8 +3,13 @@ if [ -d /home/linuxbrew/.linuxbrew/bin ]; then eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) fi -if [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then +# https://github.com/nvm-sh/nvm +if [ -d ~/.nvm ]; then + . ~/.nvm/nvm.sh + . ~/.nvm/bash_completion +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 - [ -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 + . /home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh + . /home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm fi