yarn/pyenv/rvm/etc - check for presence before doing anything

This commit is contained in:
Paul Walker
2025-03-20 10:23:47 +00:00
parent bf04458563
commit 2bb3d822f8
4 changed files with 15 additions and 8 deletions

View File

@@ -1,3 +1,6 @@
if [ -d "$HOME/.nvm" ] ; then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi

View File

@@ -1,5 +1,5 @@
if [ -d "$HOME/.pyenv" ] ; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -d "$PYENV_ROOT" ] ; then
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi

View File

@@ -1,2 +1,4 @@
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
if [ -d "$HOME/.rvm/bin" ] ; then
addpath "$HOME/.rvm/bin"
fi

View File

@@ -1,2 +1,4 @@
if [ "$HOME/.yarn/bin" ] ; then
addpath "$HOME/.yarn/bin"
addpath "$HOME/.config/yarn/global/node_modules/.bin"
fi