Move HOMEBREW_AUTO_UPDATE_SECS default definition

This ensure it'll always be set to a value.

Fixes https://github.com/Homebrew/brew/issues/10386
This commit is contained in:
Mike McQuaid 2021-01-21 13:19:06 +00:00
parent c7e9fdc839
commit e2f998d3e6
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 5 additions and 5 deletions

View File

@ -178,6 +178,11 @@ update-preinstall() {
then then
export HOMEBREW_AUTO_UPDATING="1" export HOMEBREW_AUTO_UPDATING="1"
if [[ -z "$HOMEBREW_AUTO_UPDATE_SECS" ]]
then
HOMEBREW_AUTO_UPDATE_SECS="300"
fi
# Skip auto-update if the cask/core tap has been updated in the # Skip auto-update if the cask/core tap has been updated in the
# last $HOMEBREW_AUTO_UPDATE_SECS. # last $HOMEBREW_AUTO_UPDATE_SECS.
if [[ "$HOMEBREW_COMMAND" = "cask" ]] if [[ "$HOMEBREW_COMMAND" = "cask" ]]

View File

@ -342,11 +342,6 @@ EOS
fi fi
fi fi
if [[ -z "$HOMEBREW_AUTO_UPDATE_SECS" ]]
then
HOMEBREW_AUTO_UPDATE_SECS="300"
fi
# check permissions # check permissions
if [[ -e "$HOMEBREW_CELLAR" && ! -w "$HOMEBREW_CELLAR" ]] if [[ -e "$HOMEBREW_CELLAR" && ! -w "$HOMEBREW_CELLAR" ]]
then then