From: John Schulz Date: Wed, 10 Nov 2010 16:46:05 +0000 (-0500) Subject: Alter test for `brew` to prevent false positive. X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=7ce4184c939fe141230344ded3add3de6492115d;p=common%2Fbash_it.git Alter test for `brew` to prevent false positive. `brew` reports 'no brew found in ...' to `stdout` (at least on Solaris) resulting in a false positive. --- diff --git a/completion/brew.completion.bash b/completion/brew.completion.bash index a0d9819..371fe77 100644 --- a/completion/brew.completion.bash +++ b/completion/brew.completion.bash @@ -1,4 +1,4 @@ -if [ `which brew` ]; then +if which brew >/dev/null 2>&1; then if [ -f `brew --prefix`/Library/Contributions/brew_bash_completion.sh ]; then . `brew --prefix`/Library/Contributions/brew_bash_completion.sh fi