aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-09-09 09:29:46 +0100
committerGitHub2016-09-09 09:29:46 +0100
commitb5a6b4e8e15ec5110d3ac15543990f22c5abe7b4 (patch)
tree0c0d2a1d8937d81bb983f4e5227d04747d70627d /Library/Homebrew/cmd
parent930bcb7c52523a1e03a1de132192ad4cdd74ce7a (diff)
parent492391f5feb5b7d2c33973729d8243f1909078f6 (diff)
downloadbrew-b5a6b4e8e15ec5110d3ac15543990f22c5abe7b4.tar.bz2
Merge pull request #896 from MikeMcQuaid/no-chown-usr-local
Don't require/recommend ownership of /usr/local.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/update.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index c87c16a11..ee6048ca8 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -349,12 +349,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