diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index fe230c8bca..1676f9c768 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -21,13 +21,13 @@ module Homebrew first_warning = true methods.each do |method| - begin - out = checks.send(method) - rescue NoMethodError + unless checks.respond_to?(method) Homebrew.failed = true puts "No check available by the name: #{method}" next end + + out = checks.send(method) unless out.nil? || out.empty? if first_warning $stderr.puts <<-EOS.undent