From bfa537d5faed7671c1f1fa7773a94a459d96cd0f Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 2 Mar 2012 01:21:55 +0000 Subject: [PATCH] Clearer brew doctor output for brew missing It was confusing that it told you to brew install missing deps and then listed formula that were already installed IMO. --- Library/Homebrew/cmd/doctor.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 38515c5053..f1d9181740 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -715,11 +715,18 @@ def check_tmpdir end def check_missing_deps - s = `brew missing`.strip + s = [] + `brew missing`.each_line do |line| + line =~ /(.*): (.*)/ + s << $2 + end if s.length > 0 then <<-EOS.undent - You have missing dependencies for install formula - You should `brew install` these missing dependencies: - #{s} + Some installed formula are missing dependencies. + You should `brew install` the missing dependencies: + + brew install #{s * " "} + + Run `brew missing` for more details. EOS end end