Fix type errors

This commit is contained in:
Nanda H Krishna 2025-01-22 01:45:19 +05:30
parent f69478bc1d
commit 22da03e887
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA

View File

@ -466,7 +466,7 @@ module Homebrew
sig {
params(
formula: Formula,
version: T.nilable(String),
version: String,
).void
}
def update_matching_version_resources!(formula, version:)
@ -507,7 +507,7 @@ module Homebrew
end\s
/x
leading_spaces = formula.path.read.match(/^([ ]+)resource "#{resource.name}"/).captures.first
leading_spaces = T.must(formula.path.read.match(/^([ ]+)resource "#{resource.name}"/)).captures.first
new_resource_block = <<~EOS
#{leading_spaces}resource "#{resource.name}" do
#{leading_spaces} url "#{new_url}"#{new_mirrors.map { |m| "\n#{leading_spaces} mirror \"#{m}\"" }.join}