From 7eec6a3a255d7d7ca0c29814345ee9358f6fd300 Mon Sep 17 00:00:00 2001 From: David Broder-Rodgers Date: Thu, 8 Dec 2016 21:41:24 +0000 Subject: Updated resource auditing to detect invalid mirrors when using --online --- Library/Homebrew/dev-cmd/audit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 5ed363f7c..3a4429c86 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -1490,6 +1490,11 @@ class ResourceAuditor return unless @online urls.each do |url| + begin + nostdout { curl "--connect-timeout", "15", "-o", "/dev/null", "-r", "0-0", url } + rescue ErrorDuringExecution + problem "The mirror #{u} is not reachable (curl exit code #{$?.exitstatus})" + end check_insecure_mirror(url) if url.start_with? "http:" end end -- cgit v1.2.3