I am building a homebrew for internal usage. The formula should do two things:
Install a python package => this works easily with
pip_install_and_build
.Execute the just installed python tool to update/write in
.zshrc
.
=> The problem is I cannot run the function with permission, or I cannot even have permisssion to write in .zshrc
.
I tried to either write directly in .zshrc or execute the python tool, but I always got PermissionError: operation not permitted
). But these tool don't require sudo to do that.
On thing I noticed is that while the user is the same for both .zshrc
and /opt/homebrew/Cellar
(where the python tool is), group is staff
for the former and admin
for the latter.
Is there any possibility to do what I would like? Could Homebrew asks a password to overwrite such permission?
Thank you for your help.