1dfadc734cb10c5512be4ec1dbe329a3e362ab20
- Author
- Eric Ripa <eric@ripa.io>
- Committer
- Eric Ripa <eric@ripa.io>
- Date
Message
Fix chruby plugin to not complain if chruby is *not* installed
Diff
1diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
2index 2a2c80cf67e637fada84a931134debb3e5f1df15..b461b0c9be7d5b39a27ebc7d646e93434e57e15a 100644
3--- a/plugins/chruby/chruby.plugin.zsh
4+++ b/plugins/chruby/chruby.plugin.zsh
5@@ -24,7 +24,7 @@ _homebrew-installed() {
6 }
7
8 _chruby-from-homebrew-installed() {
9- brew --prefix chruby &> /dev/null
10+ [ -r $(brew --prefix chruby)] &> /dev/null
11 }
12
13 _ruby-build_installed() {
14@@ -45,11 +45,11 @@ _source_from_omz_settings() {
15 zstyle -s :omz:plugins:chruby path _chruby_path
16 zstyle -s :omz:plugins:chruby auto _chruby_auto
17
18- if _chruby_path && [[ -r _chruby_path ]]; then
19+ if ${_chruby_path} && [[ -r ${_chruby_path} ]]; then
20 source ${_chruby_path}
21 fi
22
23- if _chruby_auto && [[ -r _chruby_auto ]]; then
24+ if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then
25 source ${_chruby_auto}
26 fi
27 }