Skip to content

Commit

Permalink
Fix auto-update for WSL
Browse files Browse the repository at this point in the history
`find` on WSL doesn't support time units, so instead of

  find ... -mtime -300s

one has to use

  find ... -mtime -300
  • Loading branch information
maxim-belkin committed Aug 5, 2024
1 parent 87fec6c commit 8fed9ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ auto-update() {
for repo_fetch_head in "${repo_fetch_heads[@]}"
do
if [[ ! -f "${repo_fetch_head}" ]] ||
[[ -z "$(find "${repo_fetch_head}" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]]
[[ -z "$(find "${repo_fetch_head}" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}" 2>/dev/null)" ]]
then
needs_auto_update=1
break
Expand Down

0 comments on commit 8fed9ae

Please # to comment.