Remove unnecessary string evals from doctor
This commit is contained in:
parent
c4cdd2b7ac
commit
d9c586e201
@ -377,21 +377,20 @@ def check_access_usr_local
|
|||||||
end
|
end
|
||||||
|
|
||||||
%w{include etc lib lib/pkgconfig share}.each do |d|
|
%w{include etc lib lib/pkgconfig share}.each do |d|
|
||||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
define_method("check_access_#{d.sub("/", "_")}") do
|
||||||
def check_access_#{d.sub("/", "_")}
|
dir = HOMEBREW_PREFIX.join(d)
|
||||||
if (dir = HOMEBREW_PREFIX+'#{d}').exist? && !dir.writable_real?
|
if dir.exist? && !dir.writable_real? then <<-EOS.undent
|
||||||
<<-EOF.undent
|
#{dir} isn't writable.
|
||||||
\#{dir} isn't writable.
|
|
||||||
This can happen if you "sudo make install" software that isn't managed by
|
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.
|
install will fail during the link step.
|
||||||
|
|
||||||
You should probably `chown` \#{dir}
|
You should probably `chown` #{dir}
|
||||||
EOF
|
|
||||||
end
|
|
||||||
end
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def check_access_logs
|
def check_access_logs
|
||||||
if HOMEBREW_LOGS.exist? and not HOMEBREW_LOGS.writable_real?
|
if HOMEBREW_LOGS.exist? and not HOMEBREW_LOGS.writable_real?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user