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:
parent
c7e9fdc839
commit
e2f998d3e6
@ -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" ]]
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user