DomT4 / homebrew-autoupdate

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

Permission denied when trying to create startup plist file #14

Closed mckernanin closed 6 years ago

mckernanin commented 6 years ago

Just installed on a new machine, and received the following error:

Error: Permission denied @ rb_sysopen - /Users/kevinmckernan/Library/LaunchAgents/com.github.domt4.homebrew-autoupdate.plist

Command used: brew autoupdate --start --upgrade --cleanup --enable-notification

I had to create the file with sudo, and then chown it to my user.

Mac OS 10.13.3
Homebrew 1.5.10
Homebrew/homebrew-core (git revision c7c1; last commit 2018-03-13)
DomT4 commented 6 years ago

This can happen on brand new machines, aye. It's a known thing I haven't yet come to a firm conclusion on how best to handle. I guess I could go down the safest route & try to catch the failure and throw a more helpful message in that situation.

DomT4 commented 6 years ago

I've gone for a more explicit nudge in https://github.com/DomT4/homebrew-autoupdate/commit/61c26de3456876bf25c7befa977fef5c3d03d9a1, since attempting to create it ourselves seemed to be failing more often than not. Hopefully that at least is a little clearer on how to resolve the issue if anyone else stumbles onto it.

Thanks for filing the issue here!