diff options
| author | Mike McQuaid | 2017-02-20 22:46:18 +0000 |
|---|---|---|
| committer | GitHub | 2017-02-20 22:46:18 +0000 |
| commit | 7fdbf6f47f54f6bd15b0cd2cb9ff7e3de24bdeb5 (patch) | |
| tree | b7d81e1665a65a850c0e565586c4b971a928687e /Library/Homebrew | |
| parent | b45b216ee3b0f4a9d7290c9b103a6989bd1fe5b4 (diff) | |
| parent | c667a43b9790be9887bf3f175d9e6ab3dad80e1a (diff) | |
| download | brew-7fdbf6f47f54f6bd15b0cd2cb9ff7e3de24bdeb5.tar.bz2 | |
Merge pull request #2067 from ilovezfs/insecure-mirror-check-handle-empty-stdout
audit: fix insecure mirror check when stdout is empty
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 5ed363f7c..9ffef0f99 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -1499,7 +1499,7 @@ class ResourceAuditor secure_url = url.sub "http", "https" secure_details = get_content_details(secure_url) - return if !details[:status].start_with?("2") || !secure_details[:status].start_with?("2") + return if details[:status].nil? || secure_details[:status].nil? || !details[:status].start_with?("2") || !secure_details[:status].start_with?("2") etag_match = details[:etag] && details[:etag] == secure_details[:etag] content_length_match = details[:content_length] && details[:content_length] == secure_details[:content_length] |
