aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorLes Hill2011-06-19 09:20:47 -0700
committerAdam Vandenberg2011-06-19 09:46:57 -0700
commit166b199c6b478a8242915b6cd4ff79fffbb2d194 (patch)
tree13ae5387f568ebdffda6cbf037fab184d51f97a7 /Library/Homebrew
parent97ac9b4b7b63b1fde72f7c64e2ec97909829b916 (diff)
downloadhomebrew-166b199c6b478a8242915b6cd4ff79fffbb2d194.tar.bz2
doctor: check /usr/local for writablity
- Airfoil during the install of InstantOn changes /usr/local to root:wheel ownership Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-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 91df75d68..9374d19aa 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -240,6 +240,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
@@ -721,6 +739,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