summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-12-20 12:37:18 -0800
committerRobby Russell <robby@planetargon.com>2014-12-20 12:37:18 -0800
commit304e8f048059b5a71a8f561c039f3470a65c03db (patch)
tree14c03f9ab14c250a75a76dd47847574ffb707252
parentb0ad3d7c70d023c282cd2abb4c578695c52a3ed4 (diff)
parent1dfadc734cb10c5512be4ec1dbe329a3e362ab20 (diff)
downloadzsh-304e8f048059b5a71a8f561c039f3470a65c03db.tar.gz
zsh-304e8f048059b5a71a8f561c039f3470a65c03db.tar.bz2
zsh-304e8f048059b5a71a8f561c039f3470a65c03db.zip
Merge pull request #3338 from eripa/chruby_fix
Fix chruby plugin to not complain if chruby is *not* installed
-rw-r--r--plugins/chruby/chruby.plugin.zsh6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
index 2a2c80cf6..b461b0c9b 100644
--- a/plugins/chruby/chruby.plugin.zsh
+++ b/plugins/chruby/chruby.plugin.zsh
@@ -24,7 +24,7 @@ _homebrew-installed() {
}
_chruby-from-homebrew-installed() {
- brew --prefix chruby &> /dev/null
+ [ -r $(brew --prefix chruby)] &> /dev/null
}
_ruby-build_installed() {
@@ -45,11 +45,11 @@ _source_from_omz_settings() {
zstyle -s :omz:plugins:chruby path _chruby_path
zstyle -s :omz:plugins:chruby auto _chruby_auto
- if _chruby_path && [[ -r _chruby_path ]]; then
+ if ${_chruby_path} && [[ -r ${_chruby_path} ]]; then
source ${_chruby_path}
fi
- if _chruby_auto && [[ -r _chruby_auto ]]; then
+ if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then
source ${_chruby_auto}
fi
}