DomT4 / homebrew-autoupdate

:tropical_drink: An easy, convenient way to automatically update Homebrew.
BSD 2-Clause "Simplified" License
1.03k stars 57 forks source link

Detects notifier as "false" #11

Closed agross closed 3 years ago

agross commented 6 years ago

I have the terminal-notifier gem installed, but not the macOS executable.

$ brew info terminal-notifier
terminal-notifier: stable 2.0.0 (bottled), HEAD
Send macOS User Notifications from the command-line
https://github.com/julienXX/terminal-notifier
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/terminal-notifier.rb
==> Requirements
Build: xcode ✘
Required: macOS >= 10.8 ✔
$ gem which terminal-notifier
/Users/agross/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terminal-notifier-2.0.0/lib/terminal-notifier.rb

Invoking terminal-notifier manually works and shows a notification:

$ terminal-notifier -title '🍺 brew-autoupdate' -message 'Homebrew has been automatically updated.' -group 'com.github.domt4.homebrew-autoupdate''
$ echo $?
0

Starting homebrew autoupdate detects the notifier as false:

$ brew autoupdate --delete
Homebrew will no longer autoupdate and the plist has been deleted.
$ brew autoupdate --start --upgrade --cleanup --enable-notification
Homebrew will now automatically update every 24 hours, or on system boot.
$ cat "$HOME/Library/Application Support/com.github.domt4.homebrew-autoupdate/updater"
#!/bin/sh
/bin/date && /usr/local/bin/brew update && /usr/local/bin/brew upgrade -v && /usr/local/bin/brew cleanup && false -title '🍺 brew-autoupdate' -message 'Homebrew has been automatically updated.' -group 'com.github.domt4.homebrew-autoupdate'
DomT4 commented 3 years ago

I've slowly started moving away from terminal-notifier because it seems to be largely abandoned upstream and doesn't function as expected on macOS Big Sur. Closing this in favour of the broader discussion in https://github.com/DomT4/homebrew-autoupdate/issues/25.