diff options
| author | Adam Vandenberg | 2010-10-20 19:28:46 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-10-20 19:28:46 -0700 |
| commit | 93a0d56386fdeca671cf858b1bfe7b7c3d35ed72 (patch) | |
| tree | 331ffc06495a85eb9f8d813444f537798062d3e1 /Library/Homebrew | |
| parent | 06f484d1e53f526a8d71bd899a825b94947235a4 (diff) | |
| download | brew-93a0d56386fdeca671cf858b1bfe7b7c3d35ed72.tar.bz2 | |
brew-doctor - also check /usr/local/etc
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/brew_doctor.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 7707a05ab..91cca761f 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -222,6 +222,23 @@ def check_access_include end end +def check_access_etc + etc_folder = HOMEBREW_PREFIX+'etc' + return unless etc_folder.exist? + + unless etc_folder.writable? + puts <<-EOS.undent + #{etc_folder} isn't writable. + This can happen if you "sudo make install" software that isn't managed + by Homebrew. If a brew tries to write a file to this folder, the install + will fail during the link step. + + You should probably `chown` #{etc_folder} + + EOS + end +end + def check_usr_bin_ruby if /^1\.9/.match RUBY_VERSION puts <<-EOS.undent @@ -563,6 +580,7 @@ def brew_doctor check_access_share_locale check_access_share_man check_access_include + check_access_etc check_user_path check_which_pkg_config check_pkg_config_paths |
