create: fix archive check if HTML starts with spaces
This commit is contained in:
parent
e6377ed0c1
commit
d860fa1fa8
@ -84,7 +84,7 @@ module Homebrew
|
||||
r.owner = self
|
||||
filepath = r.fetch
|
||||
html_doctype_prefix = "<!doctype html"
|
||||
if File.read(filepath, html_doctype_prefix.length).downcase.start_with?(html_doctype_prefix)
|
||||
if File.read(filepath, 100).strip.downcase.start_with?(html_doctype_prefix)
|
||||
raise "Downloaded URL is not archive"
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user