Fix brew doctor warnings and spurious newline.

Fixes the problems discussed in 34c970 to ensure that `brew doctor`
does not look like it is broken on user setup problems but still
returns a sensible exit code for e.g. BrewBot.
This commit is contained in:
Mike McQuaid 2012-07-25 22:54:44 +01:00
parent 74839417ea
commit 450dcf75dc

View File

@ -936,9 +936,9 @@ module Homebrew extend self
checks.methods.select{ |method| method =~ /^check_/ }.sort.each do |method|
out = checks.send(method)
unless out.nil? or out.empty?
puts unless Homebrew.failed?
lines = out.to_s.split('\n')
ofail lines.shift
opoo lines.shift
Homebrew.failed = true
puts lines
end
end