aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/audit.rb
diff options
context:
space:
mode:
authorXu Cheng2015-09-07 18:32:38 +0800
committerXu Cheng2015-09-08 11:04:49 +0800
commite370f005c0dc8fac6f22c236e87681c2fd81bc82 (patch)
treeb46865213ea67b6bcc5ee35fe4f2acefa31391e4 /Library/Homebrew/cmd/audit.rb
parentadc077f1886733b2c5e13d800c5502ee13da6e4c (diff)
downloadbrew-e370f005c0dc8fac6f22c236e87681c2fd81bc82.tar.bz2
audit: simplify remote_official_taps
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
-rw-r--r--Library/Homebrew/cmd/audit.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 57e826bd5..5d70944d1 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -211,11 +211,6 @@ class FormulaAuditor
end
@@aliases ||= Formula.aliases
- @@remote_official_taps ||= if (homebrew_tapd = HOMEBREW_LIBRARY/"Taps/homebrew").directory?
- OFFICIAL_TAPS - homebrew_tapd.subdirs.map(&:basename).map { |tap| tap.to_s.sub(/^homebrew-/, "") }
- else
- OFFICIAL_TAPS
- end
def audit_formula_name
return unless @strict
@@ -246,6 +241,8 @@ class FormulaAuditor
end
if @online
+ @@remote_official_taps ||= OFFICIAL_TAPS - Tap.select(&:official?).map(&:repo)
+
same_name_tap_formulae += @@remote_official_taps.map do |tap|
Thread.new { Homebrew.search_tap "homebrew", tap, name }
end.flat_map(&:value)