aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorDavid Broder-Rodgers2016-12-08 21:41:24 +0000
committerDavid Broder-Rodgers2017-02-20 19:23:58 +0000
commit7eec6a3a255d7d7ca0c29814345ee9358f6fd300 (patch)
treec11893a38567e2a59ce7a29b44276dd01fda47ca /Library/Homebrew/dev-cmd
parentafb66d0c69bb7cf691125d082d9e45724d479723 (diff)
downloadbrew-7eec6a3a255d7d7ca0c29814345ee9358f6fd300.tar.bz2
Updated resource auditing to detect invalid mirrors when using --online
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
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