diff options
| author | David Broder-Rodgers | 2016-12-08 21:41:24 +0000 | 
|---|---|---|
| committer | David Broder-Rodgers | 2017-02-20 19:23:58 +0000 | 
| commit | 7eec6a3a255d7d7ca0c29814345ee9358f6fd300 (patch) | |
| tree | c11893a38567e2a59ce7a29b44276dd01fda47ca /Library/Homebrew/dev-cmd | |
| parent | afb66d0c69bb7cf691125d082d9e45724d479723 (diff) | |
| download | brew-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.rb | 5 | 
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  | 
