Remove unnecessary string evals from doctor

This commit is contained in:
Jack Nagel 2014-06-19 19:32:37 -05:00
parent c4cdd2b7ac
commit d9c586e201

View File

@ -377,21 +377,20 @@ def check_access_usr_local
end
%w{include etc lib lib/pkgconfig share}.each do |d|
class_eval <<-EOS, __FILE__, __LINE__ + 1
def check_access_#{d.sub("/", "_")}
if (dir = HOMEBREW_PREFIX+'#{d}').exist? && !dir.writable_real?
<<-EOF.undent
\#{dir} isn't writable.
define_method("check_access_#{d.sub("/", "_")}") do
dir = HOMEBREW_PREFIX.join(d)
if dir.exist? && !dir.writable_real? then <<-EOS.undent
#{dir} isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a brew tries to write a file to this directory, the
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
You should probably `chown` \#{dir}
EOF
end
end
You should probably `chown` #{dir}
EOS
end
end
end
def check_access_logs
if HOMEBREW_LOGS.exist? and not HOMEBREW_LOGS.writable_real?