DomT4 / homebrew-autoupdate

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

Apps from casks won't automatically restart after updating #86

Closed mjbaldwin closed 2 years ago

mjbaldwin commented 2 years ago

I used homebrew to install most of my Macs apps as casks, e.g. apps like Google Chrome. A few months ago I installed homebrew on a brand-new Macbook Air M1 with Monterey with apps.

The problem I have is that, having set apps to autoupdate every 24h, every time an app actually does autoupdate, it won't automatically restart. The old version of the app quits, but the updated version won't start automatically.

This happens with lots of always-running apps that live in my menubar like Stats, but it also happens whenever I (infrequently) restart Chrome. Today, for example, I put "chrome://restart" in its menubar, and while it quit, it didn't restart. And then when I went to launch Chrome from its icon, I got this warning:

Homebrew Cask downloaded this file today at 15:20 from www.google.com. Apple checked it for malicious software and none was detected.

Then I clicked OK and Chrome started. So the issue is clearly Gatekeeper -- when apps are supposed to auto-restart they don't (and doesn't even show a prompt), while with manually started apps it does show a prompt.

Is there a way to bypass the prompt and have apps start without one? I don't want to turn off Gatekeeper entirely, and the funny thing is that Gatekeeper explicitly reports it doesn't find malicious software, so I don't even understand why there's a prompt in the first place.

This has sadly been getting tiresome (there are menubar apps I expect to be always-on, and not die on every update), and what I don't understand is that back when I use apps own auto-update feature, this is never a problem. I never was asked to approve each Chrome upgrade by Gatekeeper until I started using the cask autoupdate instead of Chrome's own.

So my questions are:

1) Is this a problem other people are having?

2) Is there a way for me to fix it on my Mac I don't know about? (Without entirely disabling Gatekeeper)

3) Is there a way for brew (auto)update to not suffer from this problem?

I'm actually most mystified because this doesn't appear to be a common problem -- Googing the text of the Gatekeeper message together with homebrew doesn't seem to yield much.

Thank you!

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

mjbaldwin commented 2 years ago

Is there a better place to ask this -- should I try filing under the main "brew" repository rather than "homebrew-update"?

(This repository certainly has plenty of code being actively committed, but barely seems to have any issues filed.)

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.