mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
ENH: detection of rbenv path
This commit is contained in:
parent
17673bab20
commit
b7161cd9e5
1 changed files with 10 additions and 1 deletions
|
@ -290,16 +290,25 @@ do_remove() {
|
||||||
|
|
||||||
config_bundler() {
|
config_bundler() {
|
||||||
HOME="$(eval echo ~$(id -un))"
|
HOME="$(eval echo ~$(id -un))"
|
||||||
if [ -d "/usr/local/rbenv/bin" ]; then
|
|
||||||
|
if [ -d "$1/.rbenv/bin" ]; then
|
||||||
|
PATH="$1/.rbenv/bin:$1/.rbenv/shims:$1"
|
||||||
|
eval "$(rbenv init -)"
|
||||||
|
USE_LOCAL_BUNDLE=1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
elif [ -d "/usr/local/rbenv/bin" ]; then
|
||||||
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH"
|
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH"
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
USE_LOCAL_BUNDLE=1
|
USE_LOCAL_BUNDLE=1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
elif [ -d "$HOME/.rbenv/bin" ]; then
|
elif [ -d "$HOME/.rbenv/bin" ]; then
|
||||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
USE_LOCAL_BUNDLE=1
|
USE_LOCAL_BUNDLE=1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# TODO: test rvm
|
# TODO: test rvm
|
||||||
# elif [ -f /etc/profile.d/rvm.sh ]; then
|
# elif [ -f /etc/profile.d/rvm.sh ]; then
|
||||||
# source /etc/profile.d/rvm.sh
|
# source /etc/profile.d/rvm.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue