Skip to content
Snippets Groups Projects
Commit a6f9a1c4 authored by Jack Nagel's avatar Jack Nagel
Browse files

fetch: rename 'tarball' to 'download'

parent db0c93db
No related branches found
No related tags found
No related merge requests found
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}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment