brew-man: only exit 1 when an error occurs

Because of "set -e" in non verbose mode brew man had an exit status
equals to 1 whereas there was no error.  The reason was that the "test"
command failed.  This patch fix this.

Closes Homebrew/homebrew#10664.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Nicolas Despres 2012-03-03 19:02:10 +01:00 committed by Jack Nagel
parent 28d6a0f4de
commit 6898eadcc5

View File

@ -45,7 +45,7 @@ do
ronn --roff --pipe --organization='Homebrew' --manual='brew' $i > $target_file
done
test "$1" = '--verbose' || \
test "$1" = '-v' && {
if test "$1" = '--verbose' || test "$1" = '-v'
then
man brew
}
fi