We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d860fa1 commit 87e5736Copy full SHA for 87e5736
Library/Homebrew/formula_creator.rb
@@ -84,7 +84,10 @@ def write_formula!
84
r.owner = self
85
filepath = r.fetch
86
html_doctype_prefix = "<!doctype html"
87
- if File.read(filepath, 100).strip.downcase.start_with?(html_doctype_prefix)
+ # Number of bytes to read from file start to ensure it is not HTML.
88
+ # HTML may start with arbitrary number of whitespace lines.
89
+ head_len = 100
90
+ if File.read(filepath, head_len).strip.downcase.start_with?(html_doctype_prefix)
91
raise "Downloaded URL is not archive"
92
end
93
0 commit comments