mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 21:58:00 +00:00
Don't double-source chruby
If chruby was installed using default way, most likely chruby and auto-switching will be already sourced (at least on most Linuxes).
This commit is contained in:
parent
d7622624aa
commit
e26387656d
@ -25,9 +25,14 @@ elif (( $+commands[rbenv] )); then
|
|||||||
|
|
||||||
# Load package manager installed chruby into the shell session.
|
# Load package manager installed chruby into the shell session.
|
||||||
elif (( $+commands[chruby-exec] )); then
|
elif (( $+commands[chruby-exec] )); then
|
||||||
|
if (( ! $+functions[chruby] )); then
|
||||||
source "${commands[chruby-exec]:h:h}/share/chruby/chruby.sh"
|
source "${commands[chruby-exec]:h:h}/share/chruby/chruby.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if zstyle -t ':prezto:module:ruby:chruby' auto-switch; then
|
if zstyle -t ':prezto:module:ruby:chruby' auto-switch; then
|
||||||
|
if (( ! $+functions[chruby_auto] )); then
|
||||||
source "${commands[chruby-exec]:h:h}/share/chruby/auto.sh"
|
source "${commands[chruby-exec]:h:h}/share/chruby/auto.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
# If a default Ruby is set, switch to it.
|
# If a default Ruby is set, switch to it.
|
||||||
chruby_auto
|
chruby_auto
|
||||||
|
Loading…
Reference in New Issue
Block a user