-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch permission errors when doing brew cleanup #4989
Comments
Please fill in the issue template i.e. provide your |
Sorry, I didn't think that was necessary because it's not really a bug with Brew, but a suggestion that it should catch errors (in my case, a permission error that was almost certainly my fault) when doing I had to use sudo to delete the
I can't reproduce it anymore because I already manually deleted those folders as root (and my brew is 100% clean now), but I imagine it would be reproducible if you create a folder+file that's only modifiable by root in one of the Cellar's versions, and then try to run cleanup. Hope this helps explain the situation and I didn't forget to include anything. |
Could you try that and also include your |
mujs updated to 1.0.5 now, so I got to use 1.0.4 to demo. Hopefully I'm making it clear that the whole situation is caused by PEBKAC: user creating files in the Cellar that's not able to be deleted by the user invoking brew. Instructions:
Now, gives error on cleanup, and doctor is same as before:
Permissions on this stuff:
If I fix those permissions (take ownership of that folder and file -- which was created earlier by me -- to my user), brew cleanup runs fine:
|
Does Homebrew have utilities to regain file ownership en masse? Cask does in the Staged module. |
Also noticed the same. brew doctor
brew config
|
@steinmb Please avoid "me too" comments; this will apply to everyone. Thanks! |
All of my python installs are doing the same thing
but when I rerun |
@nikhiljha That's a different issue. Please open a new issue for it, fill out the issue template and ideally run the relevant command with a |
Hello,
When running
brew cleanup
, it was unable to delete some files in my PHP install (I guess that I stupidly ran PHP as a different user at some point or something, so that var/logs directory has files that my user couldn't delete).Due to this error, it terminated the brew process, instead of continuing until the end -- and so I lost the ability to easily see how much disk space I regained from running cleanup in the first place.
Suggestion: catch these types of errors, so brew process will continue as normal, proceeding to the next formula in cleanup. Alternatively, if there is some legitimate reason for brew to fully stop processing when this type of error happens, it should still print the wonderful This operation has freed approximately xx GB of disk space message.
So not a major problem, but I thought it would be a useful idea in the future. Thanks for your time.
The text was updated successfully, but these errors were encountered: