aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-02-28 18:48:14 +0000
committerMax Howell2012-02-28 18:49:40 +0000
commitd272d75bb3a73924ffca51d30e285afeeff0916a (patch)
tree72cfdb05d178ae471edb670c420f31abe7bd9668 /Library
parent2559c5f2947aa7f8a8b8a33ae3e15730fcf77afe (diff)
downloadhomebrew-d272d75bb3a73924ffca51d30e285afeeff0916a.tar.bz2
Revert "Writability for /usr/local is no longer required"
This reverts commit 21acfc1c7e66babf112196812fdfcf442edf3a97. This was reverted because we tried to leave /usr/local with root permissions, but this caused problems for us. Sorry Rogue Amoeba. I'd suggest not installing your App's tools into /usr/local. It's outside your App's domain, so you can't be sure what will happen there.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index eff374366..c3d20d013 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -255,6 +255,24 @@ def __check_subdir_access base
end
end
+def check_access_usr_local
+ return unless HOMEBREW_PREFIX.to_s == '/usr/local'
+
+ unless Pathname('/usr/local').writable?
+ puts <<-EOS.undent
+ The /usr/local directory is not writable.
+
+ Even if this folder was writable when you installed Homebrew, other
+ software may change permissions on this folder. Some versions of the
+ "InstantOn" component of Airfoil are known to do this.
+
+ You should probably change the ownership and permissions of /usr/local
+ back to your user account.
+
+ EOS
+ end
+end
+
def check_access_share_locale
__check_subdir_access 'share/locale'
end
@@ -826,6 +844,7 @@ module Homebrew extend self
check_for_other_package_managers
check_for_x11
check_for_nonstandard_x11
+ check_access_usr_local
check_access_include
check_access_etc
check_access_share