aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index 22ebb87ed..42ab7d496 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -179,6 +179,15 @@ then
set -- "$@" -v
fi
+for arg in "$@"
+do
+ if [[ $arg = "--help" || $arg = "-h" || $arg = "--usage" || $arg = "-?" ]]
+ then
+ export HOMEBREW_HELP="1"
+ break
+ fi
+done
+
HOMEBREW_ARG_COUNT="$#"
HOMEBREW_COMMAND="$1"
shift
@@ -268,6 +277,7 @@ setup-analytics
report-analytics-screenview-command
update-preinstall() {
+ [[ -z "$HOMEBREW_HELP" ]] || return
[[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return
[[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return