diff options
| author | Adam Vandenberg | 2010-09-29 11:56:58 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-09-29 11:56:58 -0700 |
| commit | 5707787358b795c5c2e9891346203e0283e64d0b (patch) | |
| tree | f2d3b8b4c735571f6b78b36fa8f2a51a14fad69c /Library | |
| parent | e757d7c9563fb30e0d5b06ffeb6e42e3160d7e0a (diff) | |
| download | brew-5707787358b795c5c2e9891346203e0283e64d0b.tar.bz2 | |
brew-doctor - add access check to include
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew_doctor.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 96abb371f..7e9935c17 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -204,6 +204,24 @@ def check_access_pkgconfig end end +def check_access_include + # Installing MySQL manually (for instance) can chown include to root. + include_folder = HOMEBREW_PREFIX+'include' + return unless include_folder.exist? + + unless include_folder.writable? + puts <<-EOS.undent + #{include_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 header file to this folder, the + install will fail during the link step. + + You should probably `chown` #{include_folder} + + EOS + end +end + def check_usr_bin_ruby if /^1\.9/.match RUBY_VERSION puts <<-EOS.undent @@ -544,6 +562,7 @@ def brew_doctor check_for_nonstandard_x11 check_access_share_locale check_access_share_man + check_access_include check_user_path check_which_pkg_config check_pkg_config_paths |
