aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorilovezfs2017-02-20 07:51:04 -0800
committerilovezfs2017-02-20 07:51:04 -0800
commitc667a43b9790be9887bf3f175d9e6ab3dad80e1a (patch)
tree76e27cee70c0828d3ef9a7621f2dbf1d5e00e5f2 /Library/Homebrew/dev-cmd
parentafb66d0c69bb7cf691125d082d9e45724d479723 (diff)
downloadbrew-c667a43b9790be9887bf3f175d9e6ab3dad80e1a.tar.bz2
audit: fix insecure mirror check when stdout is empty
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb2
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]