Closed ndbroadbent closed 1 year ago
I also just noticed there's a bug with the log parsing. grep -E -m1 'taps|date'"
is matching the first line in the logs: or list them with brew outdated.
$ /usr/bin/tail -r ~/Library/Logs/com.github.domt4.homebrew-autoupdate/*.out
or list them with brew outdated.
You can upgrade them with brew upgrade
You have 178 outdated formulae and 13 outdated casks installed.
virtualbox
rescuetime
qbittorrent
postico
EDIT: Can filter out this line with | grep -Ev 'with brew outdated' |
so that it matches on the correct one:
# Before:
$ /usr/bin/tail -r ~/Library/Logs/com.github.domt4.homebrew-autoupdate/*.out | grep -E -m1 'taps|date'
or list them with brew outdated.
# After:
$ /usr/bin/tail -r ~/Library/Logs/com.github.domt4.homebrew-autoupdate/*.out | grep -Ev 'with brew outdated' | grep -E -m1 'taps|date'
You have 178 outdated formulae and 13 outdated casks installed.
Have included this change in the PR as well
Also confirming this fixes the specific scenario of GNU coreutils installed (tested locally), great work @ndbroadbent. Can the PR be expedited?
Alternatively, if this is not a desirable change perhaps using tac
rather than tail -r
could be considered. The same reversed output of the log is created by tac natively whether using native MacOS binaries or GNU Coreutils.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@troyfisher Thanks for the tip about tac
, I didn't know about that! I will update to use that
EDIT: Oh actually it's not available on Mac by default: https://unix.stackexchange.com/questions/114041/how-can-i-get-the-tac-command-on-os-x
Might be better to stick to /usr/bin/tail -r
since this will use the default tail
command on all macOS systems
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Fixes #37
GNU tail doesn't support the
-r
flag, so that's why it was failing for me and running the "on error" section:Can be fixed by using
/usr/bin/tail -r
, which is the default tail that comes with macOS.Before:
After: