aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-01 20:11:22 -0500
committerJack Nagel2014-07-01 20:11:55 -0500
commit3d9dcc9ef4ea1b58f465fa0c549b92c156dbc563 (patch)
treeab936526ecd89f61c0a5b941e394b1e4dc751009 /Library
parent7cbdf5356726ae0849b26e1914f6fde77dab0f2e (diff)
downloadhomebrew-3d9dcc9ef4ea1b58f465fa0c549b92c156dbc563.tar.bz2
Use sort_by in missing deps doctor check
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 0bf9b89ef..fd40cf6c6 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -891,16 +891,16 @@ end
def check_missing_deps
return unless HOMEBREW_CELLAR.exist?
- s = Set.new
+ missing = Set.new
Homebrew.missing_deps(Formula.installed).each_value do |deps|
- s.merge deps
+ missing.merge(deps)
end
- if s.length > 0 then <<-EOS.undent
+ if missing.any? then <<-EOS.undent
Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
- brew install #{s.to_a.sort * " "}
+ brew install #{missing.sort_by(&:name) * " "}
Run `brew missing` for more details.
EOS