aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-05-07 22:14:56 -0400
committerJack Nagel2015-05-07 22:15:57 -0400
commit5c8ceaa4581fa848e4e69021c4826631df88ea6d (patch)
tree7d888f0f42c7d306cc88ba5f7360c5ae0e59fd46 /Library
parent5c414dca5b5affb374bb5409b6d5564a448498dd (diff)
downloadbrew-5c8ceaa4581fa848e4e69021c4826631df88ea6d.tar.bz2
Warn about duplicated URLs
Closes Homebrew/homebrew#39486.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 3ddbdd048..684b2d097 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -321,8 +321,15 @@ class FormulaAuditor
problem "\"http://ftpmirror.gnu.org\" is preferred for GNU software (url is #{u})."
end
+ mirrors = @specs.map(&:mirrors).flatten
+ dupes = urls & mirrors
+
+ dupes.each do |dupe|
+ problem "URL should not be duplicated as a mirror: #{dupe}"
+ end
+
# the rest of the checks apply to mirrors as well.
- urls.concat(@specs.map(&:mirrors).flatten)
+ urls += mirrors
# Check a variety of SSL/TLS links that don't consistently auto-redirect
# or are overly common errors that need to be reduced & fixed over time.