From 2c6a7bdca8fe86257a588716842c763d5204ed0f Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 23 Jan 2013 20:12:55 -0800 Subject: [PATCH] Check ownership of logs folder Closes Homebrew/homebrew#16607. --- Library/Homebrew/cmd/doctor.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 3602365118..b6207112ac 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -370,6 +370,21 @@ def check_access_share 'fail during the link step.' end +def check_access_logs + folder = Pathname.new('~/Library/Logs/Homebrew') + if folder.exist? and not folder.writable_real? + <<-EOS.undent + #{folder} isn't writable. + This can happen if you "sudo make install" software that isn't managed + by Homebrew. + + Homebrew writes debugging logs to this location. + + You should probably `chown` #{folder} + EOS + end +end + def check_usr_bin_ruby if /^1\.9/.match RUBY_VERSION <<-EOS.undent