aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-30 14:14:14 +0100
committerAlyssa Ross2016-10-25 22:34:35 +0100
commitc88b67f3a8f7e90ad974eaf82d00fd88827a1e4c (patch)
treef032a7b2cda3814f2c53747de3374d3d6929758a
parent8e3e8e31c23e5ec6e204ee5462cb9d22119891ee (diff)
downloadbrew-c88b67f3a8f7e90ad974eaf82d00fd88827a1e4c.tar.bz2
missing: simplify code a bit
-rw-r--r--Library/Homebrew/diagnostic.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 0031811c5..a5b1302bd 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -8,6 +8,8 @@ require "utils/shell"
module Homebrew
module Diagnostic
def self.missing_deps(ff, hide = nil)
+ hide ||= []
+
missing = {}
ff.each do |f|
missing_deps = f.recursive_dependencies do |dependent, dep|
@@ -20,12 +22,8 @@ module Homebrew
end
missing_deps.map!(&:to_formula)
- if hide
- missing_deps.reject! do |d|
- !hide.include?(d.name) && d.installed_prefixes.any?
- end
- else
- missing_deps.reject! { |d| d.installed_prefixes.any? }
+ missing_deps.reject! do |d|
+ !hide.include?(d.name) && d.installed_prefixes.any?
end
unless missing_deps.empty?