formula_creator: Remove unneeded reader for url

This commit is contained in:
Anatoli Babenia 2023-11-29 18:48:06 +00:00
parent b6ef91e879
commit 2d9db76d61

View File

@ -9,7 +9,7 @@ module Homebrew
# #
# @api private # @api private
class FormulaCreator class FormulaCreator
attr_reader :url, :tap attr_reader :tap
attr_accessor :name attr_accessor :name
sig { sig {
@ -59,7 +59,7 @@ module Homebrew
elsif @fetch elsif @fetch
unless @head unless @head
r = Resource.new r = Resource.new
r.url(url) r.url(@url)
r.version(@version) r.version(@version)
r.owner = self r.owner = self
@sha256 = r.fetch.sha256 if r.download_strategy == CurlDownloadStrategy @sha256 = r.fetch.sha256 if r.download_strategy == CurlDownloadStrategy
@ -102,7 +102,7 @@ module Homebrew
desc "#{@desc}" desc "#{@desc}"
homepage "#{@homepage}" homepage "#{@homepage}"
<% unless @head %> <% unless @head %>
url "#{url}" url "#{@url}"
<% unless @version.detected_from_url? %> <% unless @version.detected_from_url? %>
version "#{@version}" version "#{@version}"
<% end %> <% end %>
@ -110,7 +110,7 @@ module Homebrew
<% end %> <% end %>
license "#{@license}" license "#{@license}"
<% if @head %> <% if @head %>
head "#{url}" head "#{@url}"
<% end %> <% end %>
<% if @mode == :cmake %> <% if @mode == :cmake %>