fix installation issue, check command before run it
authorPeng Li <seudut@gmail.com>
Sun, 22 Jan 2017 07:05:59 +0000 (15:05 +0800)
committerPeng Li <seudut@gmail.com>
Sun, 22 Jan 2017 07:05:59 +0000 (15:05 +0800)
zsh/zshrc

index d8f77ff..90b0c45 100644 (file)
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -208,7 +208,10 @@ export ZSHHOME="$HOME/.zsh"
 
 
 #` git log --oneline --abbrev-commit --all --graph --decorate --color `
-[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
+`which brew`  &> /dev/null
+if [ $? -eq 0 ]; then
+       [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
+fi
 
 alias emacs='TERM=xterm-256color emacs -nw'