-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix Homebrew auto-update for GNU find #17968
Fix Homebrew auto-update for GNU find #17968
Conversation
Update 1: Converted to DRAFT for now because WSL treats numbers as "hours", not seconds |
`find` on WSL doesn't support time units, so instead of find ... -mtime -300s one has to use find ... -mtime -300
8fed9ae
to
f69461a
Compare
Is this dependent on the distribution used in WSL? Can I see your
I'd like to see confirmation from someone that this still works on ancient Linux/macOS versions that we support (CC @EricFromCanada and @Bo98 who tend to be able to help with these sorts of things). |
Sure.
|
The man page for |
I noticed this as well on ubuntu/debian and was going to make the same PR 😄 Looks like GNU find's And confirmed in ubuntu 12.04 + debian 9.0 (oldest images my docker version can still run): $ docker run --rm ubuntu:12.04 find /root/.bashrc -type f -newermt "-13 years"
/root/.bashrc
$ docker run --rm debian:9.0 find /root/.bashrc -type f -newermt "-15 years"
/root/.bashrc |
I checked back and it seems like it was added on the macOS side back in Mac OS X 10.2. |
Thanks for checking all and for the PR @maxim-belkin, great work! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?find
on WSL doesn't support time units:So, to make Homebrew work correctly with both GNU and BSD versions of
find
, instead ofwe can use
-newermt
option, which is supported by both versions of thefind
command: