From 4f238bdd46f40233d732cb8d2a3fdee679504087 Mon Sep 17 00:00:00 2001 From: Joe Moon Date: Fri, 30 Sep 2016 19:12:47 -0700 Subject: [PATCH] restore `command -v brew` check --- bin/autojump.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/autojump.zsh b/bin/autojump.zsh index 79f7cd2..a761206 100644 --- a/bin/autojump.zsh +++ b/bin/autojump.zsh @@ -10,9 +10,11 @@ fi # set homebrew installation paths -local brew_prefix=${BREW_PREFIX:-$(brew --prefix)} -if [[ -d "${brew_prefix}/share/zsh/site-functions" ]]; then +if command -v brew &>/dev/null; then + local brew_prefix=${BREW_PREFIX:-$(brew --prefix)} + if [[ -d "${brew_prefix}/share/zsh/site-functions" ]]; then fpath=("${brew_prefix}/share/zsh/site-functions" ${fpath}) + fi fi