Created
February 15, 2016 09:43
-
-
Save c10l/a182ebaedf6b014cbc70 to your computer and use it in GitHub Desktop.
Fix Homebrew on OS X El Capitan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _brew () { | |
for f in /usr/local/*; do | |
if [ ! -w "${f}" ]; then | |
echo 'Fixing /usr/local ownership...' | |
sudo chown -R $(whoami):admin /usr/local | |
break | |
fi | |
done | |
brew $* | |
} | |
alias brew=_brew |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment