Skip to content

Commit

Permalink
doctor: handle non-extent methods passed as arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Nov 27, 2014
1 parent 13451b7 commit 939205b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Library/Homebrew/cmd/doctor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,13 @@ def doctor

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
Expand Down

0 comments on commit 939205b

Please sign in to comment.