diff options
| author | Mike McQuaid | 2016-09-09 08:06:37 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-09-09 08:06:37 +0100 |
| commit | 492391f5feb5b7d2c33973729d8243f1909078f6 (patch) | |
| tree | 3657ad828a8f194fc0ffcad8ac4c88d9ca066d93 /Library/Homebrew/cmd | |
| parent | 1d66cdd3ade841c6b7cd8a71d4b71d5426d00a58 (diff) | |
| download | brew-492391f5feb5b7d2c33973729d8243f1909078f6.tar.bz2 | |
Don't require/recommend ownership of /usr/local.
Apple reset this on every OS X major (and some minor) updates and it
always proves a painful and unnecessary step. Instead just check the
directories we actually care about are writable.
This may mean if these directories do not already exist (although they
are now created by the installed) that `brew link` will fail and require
manual intervention but this seems to be superior for both new and the
majority of existing users.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index ed51444c5..4a4a56bc3 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -341,12 +341,13 @@ EOS fi # check permissions - if [[ "$HOMEBREW_PREFIX" = "/usr/local" && ! -w /usr/local ]] + if [[ -e "$HOMEBREW_CELLAR" && ! -w "$HOMEBREW_CELLAR" ]] then odie <<EOS -/usr/local is not writable. You should change the ownership -and permissions of /usr/local back to your user account: - sudo chown -R \$(whoami) /usr/local +$HOMEBREW_CELLAR is not writable. You should change the +ownership and permissions of $HOMEBREW_CELLAR back to your +user account: + sudo chown -R \$(whoami) $HOMEBREW_CELLAR EOS fi |
