mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #11754 from Rylan12/update-preinstall-check
Use Homebrew/brew when checking `HOMEBREW_AUTO_UPDATE_SECS`
This commit is contained in:
commit
5ec335188f
@ -207,11 +207,11 @@ update-preinstall() {
|
|||||||
HOMEBREW_AUTO_UPDATE_SECS="300"
|
HOMEBREW_AUTO_UPDATE_SECS="300"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Skip auto-update if the core tap has been updated in the
|
# Skip auto-update if the repository has been updated in the
|
||||||
# last $HOMEBREW_AUTO_UPDATE_SECS.
|
# last $HOMEBREW_AUTO_UPDATE_SECS.
|
||||||
tap_fetch_head="${HOMEBREW_CORE_REPOSITORY}/.git/FETCH_HEAD"
|
repo_fetch_head="${HOMEBREW_REPOSITORY}/.git/FETCH_HEAD"
|
||||||
if [[ -f "${tap_fetch_head}" &&
|
if [[ -f "${repo_fetch_head}" &&
|
||||||
-n "$(find "${tap_fetch_head}" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]]
|
-n "$(find "${repo_fetch_head}" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]]
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user