formula_creator: tweak variable name

This commit is contained in:
Mike McQuaid 2025-05-30 14:55:50 +01:00 committed by GitHub
parent 87e57368d4
commit e71b1473b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,8 +86,8 @@ module Homebrew
html_doctype_prefix = "<!doctype html" html_doctype_prefix = "<!doctype html"
# Number of bytes to read from file start to ensure it is not HTML. # Number of bytes to read from file start to ensure it is not HTML.
# HTML may start with arbitrary number of whitespace lines. # HTML may start with arbitrary number of whitespace lines.
head_len = 100 bytes_to_read = 100
if File.read(filepath, head_len).strip.downcase.start_with?(html_doctype_prefix) if File.read(filepath, bytes_to_read).strip.downcase.start_with?(html_doctype_prefix)
raise "Downloaded URL is not archive" raise "Downloaded URL is not archive"
end end