From 6017811397b7ee0797fe452309e37fb5018689a5 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Wed, 26 Nov 2014 17:54:53 -0800 Subject: [PATCH] doctor: handle non-extent methods passed as arguments --- Library/Homebrew/cmd/doctor.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 93c0e398ec..d7f8538512 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -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