Skip to content
Snippets Groups Projects
Commit fd014978 authored by Uladzislau Shablinski's avatar Uladzislau Shablinski
Browse files

brew.sh: don't autoupdate if --help passed

parent cc59e624
No related branches found
No related tags found
No related merge requests found
...@@ -179,6 +179,15 @@ then ...@@ -179,6 +179,15 @@ then
set -- "$@" -v set -- "$@" -v
fi 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_ARG_COUNT="$#"
HOMEBREW_COMMAND="$1" HOMEBREW_COMMAND="$1"
shift shift
...@@ -268,6 +277,7 @@ setup-analytics ...@@ -268,6 +277,7 @@ setup-analytics
report-analytics-screenview-command report-analytics-screenview-command
update-preinstall() { update-preinstall() {
[[ -z "$HOMEBREW_HELP" ]] || return
[[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return [[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return
[[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment