From 492391f5feb5b7d2c33973729d8243f1909078f6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 9 Sep 2016 08:06:37 +0100 Subject: 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. --- Library/Homebrew/cmd/update.sh | 9 +++++---- Library/Homebrew/diagnostic.rb | 42 +++++++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 17 deletions(-) (limited to 'Library') 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 <