Skip to content

Commit

Permalink
Fixes Homebrew#10369; Doctor output is unreadable.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 21, 2012
1 parent c1911f7 commit 14478ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Library/Homebrew/cmd/doctor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,16 @@ def check_user_path
# only show the doctor message if there are any conflicts
# rationale: a default install should not trigger any brew doctor messages
conflicts = Dir["#{HOMEBREW_PREFIX}/bin/*"].
select {|fn| File.exist? "/usr/bin/#{File.basename fn}"}.
map {|fn| File.basename fn}
map{ |fn| File.basename fn }.
select{ |bn| File.exist? "/usr/bin/#{bn}" }

if conflicts.size
ohai "/usr/bin occurs before #{HOMEBREW_PREFIX}/bin"
puts <<-EOS.undent
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
#{conflicts * "\n "}
#{conflicts * "\n "}
Consider editing your .bashrc to put #{HOMEBREW_PREFIX}/bin
ahead of /usr/bin in your PATH.
Expand Down

0 comments on commit 14478ee

Please sign in to comment.