Another approach is to create a new 'brew' user on the mac, and use it to install everything. You change to that user to add new binaries, but never use the 'brew' user account for anything else. Not requiring a password to add software, or to alter the files is /usr/local, is a huge security hole.
Hi Apple Ninja, great video! -- thank you. Q: I’m a bit confused though could you please clarify. As I understand your solution to this brew flaw is to chown the permissions back and forth. In other words you maintain permissions as: sudo chown root:wheel /usr/local/bin and then sudo chown macguy:admin /usr/local/bin when you want to install a formula? Is that correct? And what about: /usr/local/opt Q: Would your permissions toggling be advisable there, too? And if not why not?