CurlDownloadStrategy: remove "tarball_path" accessor
This information is already exposed as "cached_location", which is common to all download strategies.
This commit is contained in:
parent
e8997c8a5a
commit
65775e4318
@ -9,14 +9,13 @@ class Formula
|
|||||||
|
|
||||||
# Force the downloader to attempt the download by removing the tarball if
|
# Force the downloader to attempt the download by removing the tarball if
|
||||||
# it is allready cached.
|
# it is allready cached.
|
||||||
tarball_path = downloader.tarball_path
|
cached_download.unlink if cached_download.exist?
|
||||||
tarball_path.unlink if tarball_path.exist?
|
|
||||||
|
|
||||||
fetched = downloader.fetch
|
downloader.fetch
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
opoo "Failed to fetch from URL: #{url}"
|
opoo "Failed to fetch from URL: #{url}"
|
||||||
else
|
else
|
||||||
verify_download_integrity fetched if fetched.kind_of? Pathname
|
verify_download_integrity(cached_download) if cached_download.file?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@ class AbstractDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class CurlDownloadStrategy < AbstractDownloadStrategy
|
class CurlDownloadStrategy < AbstractDownloadStrategy
|
||||||
attr_reader :tarball_path
|
|
||||||
attr_accessor :local_bottle_path
|
attr_accessor :local_bottle_path
|
||||||
|
|
||||||
def initialize name, package
|
def initialize name, package
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user