1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00

[bash] check if rvm / ruby bin directories exist before adding them to the PATH

This commit is contained in:
Hyacinthe Cartiaux 2016-05-10 18:28:00 +02:00
parent 05149e0129
commit ba2735b603

View file

@ -164,7 +164,9 @@ fi
# Ruby & RVM # Ruby & RVM
# ------------------------------------------------------------------- # -------------------------------------------------------------------
export PATH="$PATH:$(echo /usr/lib/ruby/gems/*)/bin:$HOME/.rvm/bin"
[ -d "/usr/lib/ruby/gems" ] && export PATH="$PATH:$(echo /usr/lib/ruby/gems/*)/bin"
[ -d "$HOME/.rvm/bin" ] && export PATH="$PATH:$HOME/.rvm/bin"
# RVM specific (see http://beginrescueend.com/) # RVM specific (see http://beginrescueend.com/)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" || true [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" || true