diff options
| author | David Broder-Rodgers | 2017-01-24 20:35:07 +0000 |
|---|---|---|
| committer | David Broder-Rodgers | 2017-02-20 19:24:35 +0000 |
| commit | 81b3368c9cba0f9db93af5732d8f10e75d00cdf9 (patch) | |
| tree | 119fae08f12016fdca5bb8084412168683806af0 /Library | |
| parent | a731f4e17cc45bed5ed0f1121326551c558ce583 (diff) | |
| download | brew-81b3368c9cba0f9db93af5732d8f10e75d00cdf9.tar.bz2 | |
Added better check for HTTP git URLs
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index f187f17f5..c685dacae 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -1490,15 +1490,15 @@ class ResourceAuditor return unless @online urls.each do |url| - if url.start_with? "http", "ftp" + if url.start_with?("git") || url.end_with?(".git") + unless Utils.git_remote_exists url + problem "The URL #{url} is not a valid git URL" + end + elsif url.start_with? "http", "ftp" status_code = FormulaAuditor.url_status_code url unless status_code.start_with? "2" problem "The URL #{url} is not reachable (HTTP status code #{status_code})" end - elsif url.start_with? "git" - unless Utils.git_remote_exists url - problem "The URL #{url} is not a valid git URL" - end elsif url.start_with? "svn" unless Utils.svn_remote_exists url problem "The URL #{url} is not a valid svn URL" |
