DomT4 / homebrew-autoupdate

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

--upgrade flag stops autoupdate from running #20

Closed RogierdeRuijter closed 5 years ago

RogierdeRuijter commented 5 years ago

Hi,

When adding the --upgrade flag to brew autocomplete. It seems to stop autoupdate from running.

brew autoupdate --start 43200 --upgrade --cleanup --enable-notification does not work.

brew autoupdate --start 43200 --cleanup --enable-notification does work.

I am on OXS 10.14.1.

Cheers!

DomT4 commented 5 years ago

I'm failing to reproduce this locally. Can you provide the output of:

tail ~/Library/Logs/com.github.domt4.homebrew-autoupdate/com.github.domt4.homebrew-autoupdate.err

and:

tail ~/Library/Logs/com.github.domt4.homebrew-autoupdate/com.github.domt4.homebrew-autoupdate.out

Thanks!

RogierdeRuijter commented 5 years ago

tail ~/Library/Logs/com.github.domt4.homebrew-autoupdate/com.github.domt4.homebrew-autoupdate.err: chmod -Rf +w /var/folders/t6/1zw7vh2s3y9g67fzntgbjw100000gn/T/d20181109-10736-zfwfhd Warning: Building python from source: The bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install

chmod -Rf +w /private/tmp/d20181109-11302-107npme

tail ~/Library/Logs/com.github.domt4.homebrew-autoupdate/com.github.domt4.homebrew-autoupdate.out checking for putenv... yes checking for pwrite... yes checking for pwritev... no checking for pwritev2... no checking for readlink... yes checking for readlinkat... yes checking for readv... yes checking for realpath... yes checking for renameat... yes checking for sem_open... yes

I ran xcode-select --install, the command that is suggested in the .err.

This helped! Homebrew will now automatically update every 12 hours, or on system boot is the output in the terminal and the terminal notification showed up.

Just to clarify Homebrew will now automatically update every 12 hours, or on system boot. Showed up before only the notification did not show up.

Thanks!

DomT4 commented 5 years ago

Just to clarify Homebrew will now automatically update every 12 hours, or on system boot. Showed up before only the notification did not show up.

Yeah the notification, when enabled, is the trusted source of truthfulness on update status. The autoupdate command will always confirm that you've set it up with that message, but the notification shouldn't be issued unless the update itself runs successfully.

The notification adds enough value in that sense that at some point I'd like to default the notification to on as broadly as possible, but for now the current setting doesn't seem too unpopular in terms of people having to manually request it.

Glad this is resolved! Let me know if you hit any other issues.