From 1dfadc734cb10c5512be4ec1dbe329a3e362ab20 Mon Sep 17 00:00:00 2001 From: Eric Ripa Date: Mon, 24 Nov 2014 09:54:50 +0100 Subject: [PATCH] Fix chruby plugin to not complain if chruby is *not* installed --- plugins/chruby/chruby.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh index 2a2c80cf..b461b0c9 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 }