diff options
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 52dc3977b..cb0fd4660 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -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}" |
