Alter test for `brew` to prevent false positive.
authorJohn Schulz <github.com@jfsiii.org>
Wed, 10 Nov 2010 16:46:05 +0000 (11:46 -0500)
committerJohn Schulz <github.com@jfsiii.org>
Wed, 10 Nov 2010 16:46:05 +0000 (11:46 -0500)
`brew` reports 'no brew found in ...' to `stdout` (at least on Solaris) resulting in a false positive.

completion/brew.completion.bash

index a0d9819..371fe77 100644 (file)
@@ -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