Skip to content

Commit d860fa1

Browse files
committed
create: fix archive check if HTML starts with spaces
1 parent e6377ed commit d860fa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/formula_creator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def write_formula!
8484
r.owner = self
8585
filepath = r.fetch
8686
html_doctype_prefix = "<!doctype html"
87-
if File.read(filepath, html_doctype_prefix.length).downcase.start_with?(html_doctype_prefix)
87+
if File.read(filepath, 100).strip.downcase.start_with?(html_doctype_prefix)
8888
raise "Downloaded URL is not archive"
8989
end
9090

0 commit comments

Comments
 (0)