Load cask source with tap info
This info is used in the installer to decide whether to report analytics.
This commit is contained in:
parent
fdc2e9f3f5
commit
b91e93cda0
@ -46,7 +46,7 @@ module Cask
|
|||||||
private
|
private
|
||||||
|
|
||||||
def cask(header_token, **options, &block)
|
def cask(header_token, **options, &block)
|
||||||
Cask.new(header_token, source: content, **options, config: @config, &block)
|
Cask.new(header_token, source: content, tap: tap, **options, config: @config, &block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -146,18 +146,10 @@ module Cask
|
|||||||
super && !Tap.from_path(ref).nil?
|
super && !Tap.from_path(ref).nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :tap
|
|
||||||
|
|
||||||
def initialize(path)
|
def initialize(path)
|
||||||
@tap = Tap.from_path(path)
|
@tap = Tap.from_path(path)
|
||||||
super(path)
|
super(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def cask(*args, &block)
|
|
||||||
super(*args, tap: tap, &block)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Loads a cask from a specific tap.
|
# Loads a cask from a specific tap.
|
||||||
|
|||||||
@ -566,7 +566,7 @@ module Cask
|
|||||||
def load_cask_from_source_api!
|
def load_cask_from_source_api!
|
||||||
options = { git_head: @cask.tap_git_head, sha256: @cask.ruby_source_checksum["sha256"] }
|
options = { git_head: @cask.tap_git_head, sha256: @cask.ruby_source_checksum["sha256"] }
|
||||||
cask_source = Homebrew::API::Cask.fetch_source(@cask.token, **options)
|
cask_source = Homebrew::API::Cask.fetch_source(@cask.token, **options)
|
||||||
@cask = CaskLoader::FromContentLoader.new(cask_source).load(config: @cask.config)
|
@cask = CaskLoader::FromContentLoader.new(cask_source, tap: @cask.tap).load(config: @cask.config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user