fetch: rename 'tarball' to 'download'
This commit is contained in:
parent
db0c93dbae
commit
a6f9a1c4a3
@ -1,7 +1,5 @@
|
||||
require 'formula'
|
||||
|
||||
# Downloads the tarballs for the given formulae to the Cache
|
||||
|
||||
module Homebrew extend self
|
||||
def fetch
|
||||
raise FormulaUnspecifiedError if ARGV.named.empty?
|
||||
@ -27,15 +25,15 @@ module Homebrew extend self
|
||||
|
||||
def fetch_formula f
|
||||
f.cached_download.rmtree if already_fetched?(f) && ARGV.force?
|
||||
tarball, _ = f.fetch
|
||||
download, _ = f.fetch
|
||||
|
||||
# FIXME why are strategies returning different types?
|
||||
return unless tarball.is_a? Pathname
|
||||
return unless download.is_a? Pathname
|
||||
|
||||
puts "Downloaded to: #{tarball}" unless already_fetched?(f)
|
||||
puts Checksum::TYPES.map { |t| "#{t.to_s.upcase}: #{tarball.send(t)}" }
|
||||
puts "Downloaded to: #{download}" unless already_fetched?(f)
|
||||
puts Checksum::TYPES.map { |t| "#{t.to_s.upcase}: #{download.send(t)}" }
|
||||
|
||||
f.verify_download_integrity(tarball)
|
||||
f.verify_download_integrity(download)
|
||||
rescue ChecksumMismatchError => e
|
||||
Homebrew.failed = true
|
||||
opoo "Formula reports different #{e.hash_type}: #{e.expected}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user