aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update.sh
diff options
context:
space:
mode:
authorDominyk Tiller2016-07-10 01:30:29 +0100
committerDominyk Tiller2016-07-10 12:41:08 +0100
commit1022bcff064ef562acfe748e0041dd7fd225b01f (patch)
tree70f9052ad368735fe0bea2dde6c2a08e9f7d2cd1 /Library/Homebrew/cmd/update.sh
parentdf4982ed0810fac1b58aedeb6653ca908dccbd51 (diff)
downloadbrew-1022bcff064ef562acfe748e0041dd7fd225b01f.tar.bz2
update: mimic doctor permissions advice
We might as well be consistent about it, since it's not obvious to people what the next step is after we've pointed out the directory isn't writable. Fixes #476.
Diffstat (limited to 'Library/Homebrew/cmd/update.sh')
-rw-r--r--Library/Homebrew/cmd/update.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index c32556583..eebab3691 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -288,12 +288,21 @@ EOS
# check permissions
if [[ "$HOMEBREW_PREFIX" = "/usr/local" && ! -w /usr/local ]]
then
- odie "/usr/local must be writable!"
+ 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
+EOS
fi
if [[ ! -w "$HOMEBREW_REPOSITORY" ]]
then
- odie "$HOMEBREW_REPOSITORY must be writable!"
+ odie <<-EOS
+$HOMEBREW_REPOSITORY is not writable. You should change the
+ownership and permissions of $HOMEBREW_REPOSITORY back to your
+user account:
+ sudo chown -R \$(whoami) $HOMEBREW_REPOSITORY
+EOS
fi
if [[ -n "$HOMEBREW_UPDATE_PREINSTALL" ]]