mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Avoid loading rbenv twice if oh-my-zsh plugin has already loaded it
This commit is contained in:
@@ -37,8 +37,11 @@ fi
|
|||||||
|
|
||||||
# Load rbenv or RVM depending on which is available
|
# Load rbenv or RVM depending on which is available
|
||||||
if [ -d "$HOME/.rbenv/bin" ]; then
|
if [ -d "$HOME/.rbenv/bin" ]; then
|
||||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
# Don't load rbenv again if oh-my-zsh's rbenv plugin already has
|
||||||
eval "$(rbenv init -)"
|
if [[ ":$PATH:" != *":$HOME/.rbenv/bin:"* ]]; then
|
||||||
|
path_prepend "$HOME/.rbenv/bin"
|
||||||
|
eval "$(rbenv init -)"
|
||||||
|
fi
|
||||||
elif [ -s "$HOME/.rvm/scripts/rvm" ]; then
|
elif [ -s "$HOME/.rvm/scripts/rvm" ]; then
|
||||||
source "$HOME/.rvm/scripts/rvm"
|
source "$HOME/.rvm/scripts/rvm"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user