-3.1 C
New York
Tuesday, December 24, 2024

Understanding Homebrew’s “leaves” command – Ask Completely different


I’ve setup my Mac in considerably regular approach: I’ve created a consumer admin which has administration privileges, and I work my myself beneath a non-admin account. I exploit this setup out of a behavior from my previous in Unix and Linux, and I’ve realized that this isn’t supreme issues on the Mac, and really resulted to a puzzling behaviour of homebrew.

Normally, I run brew beneath the admin consumer (i.e. doing a su admin, after which set up the packages with brew).

I now seen a behaviour with brew, which I want to perceive:

Once I run – as myself – the command

brew leaves

I see all of the put in packages, and I additionally get an error message

rm: /usr/native/Homebrew/.git/describe-cache: Permission denied

The message itself is no surprise:

ls -ld /usr/native/Homebrew/.git/describe-cache

exhibits

drwxr-xr-x  3 admin  admin  96  3 Sep 08:41 /usr/native/Homebrew/.git/describe-cache

brew leaves clearly needs to take away this listing, and since I put in my packages with brew beneath the admin consumer, I’ve no permission when doing this as regular consumer.

So out of curiosity, I did a su admin to change into admin, and run the brew leaves command once more. As anticipated, no error message this time.

Nonetheless after I look once more on the listing, I see that it has nonetheless the identical timestamp as earlier than! Plainly brew didn’t even try any deletion this time.

It’s as if brew tries to erase the listing provided that it isn’t run as admin consumer.

Might somebody give me an evidence of what occurs right here?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles