doctor: handle non-extent methods passed as arguments

This commit is contained in:
Misty De Meo 2014-11-26 17:54:53 -08:00
parent d3ab27f860
commit 6017811397

View File

@ -1207,7 +1207,13 @@ module Homebrew
first_warning = true
methods.each do |method|
out = checks.send(method)
begin
out = checks.send(method)
rescue NoMethodError
Homebrew.failed = true
puts "No check available by the name: #{method}"
next
end
unless out.nil? or out.empty?
if first_warning
puts <<-EOS.undent