From f69461abd3d2081df0e3e5686cb86624cef9534f Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Mon, 5 Aug 2024 15:43:52 +0000 Subject: [PATCH] Fix auto-update for WSL `find` on WSL doesn't support time units, so instead of find ... -mtime -300s one has to use find ... -mtime -300 --- Library/Homebrew/brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 4eaef4b5f6..c62896ba00 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -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 -newermt "-${HOMEBREW_AUTO_UPDATE_SECS} seconds" 2>/dev/null)" ]] then needs_auto_update=1 break