Brew asks me to do this: sudo chown -R $(whoami) /usr/local/Homebrew
I unfortunately have other users for development on my mac that need access to Homebrew dir to run stuff.
I find an aritcle https://medium.com/@energee/install-brew-for-multiple-users-65af2444df5c
So I create the group 'brew' in the user and groups preferences pane, MThen
sudo chgrp -R brew $(brew --prefix)/Homebrew
Or, if you think it's safe:
sudo chmod -R g+w $(brew --prefix)/*