Fix basename for extracting cask downloads.
This commit is contained in:
parent
993bf95877
commit
82c1e6fb0e
@ -52,6 +52,10 @@ module Cask
|
||||
downloader.cached_location
|
||||
end
|
||||
|
||||
def basename
|
||||
downloader.basename
|
||||
end
|
||||
|
||||
def verify_download_integrity(fn)
|
||||
if @cask.sha256 == :no_check
|
||||
opoo "No checksum defined for cask '#{@cask}', skipping verification."
|
||||
|
@ -152,10 +152,14 @@ module Cask
|
||||
s.freeze
|
||||
end
|
||||
|
||||
sig { returns(Download) }
|
||||
def downloader
|
||||
@downloader ||= Download.new(@cask, quarantine: quarantine?)
|
||||
end
|
||||
|
||||
sig { returns(Pathname) }
|
||||
def download
|
||||
@download ||= Download.new(@cask, quarantine: quarantine?)
|
||||
.fetch(verify_download_integrity: @verify_download_integrity)
|
||||
@download ||= downloader.fetch(verify_download_integrity: @verify_download_integrity)
|
||||
end
|
||||
|
||||
def verify_has_sha
|
||||
@ -180,7 +184,7 @@ module Cask
|
||||
|
||||
odebug "Using container class #{primary_container.class} for #{primary_container.path}"
|
||||
|
||||
basename = CGI.unescape(File.basename(@cask.url.path))
|
||||
basename = downloader.basename
|
||||
|
||||
if nested_container = @cask.container&.nested
|
||||
Dir.mktmpdir do |tmpdir|
|
||||
|
Loading…
x
Reference in New Issue
Block a user