diff options
| author | Jack Nagel | 2013-05-16 14:06:26 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-05-16 14:06:26 -0500 | 
| commit | a6f9a1c4a3cc8a2cad998caf30522f86c2f4a3de (patch) | |
| tree | e46b74e56afc24a03c22dc599b6f8ebbb2771220 /Library/Homebrew/cmd/fetch.rb | |
| parent | db0c93dbae352a3e4ab83e31d360919f1bc3b3d7 (diff) | |
| download | brew-a6f9a1c4a3cc8a2cad998caf30522f86c2f4a3de.tar.bz2 | |
fetch: rename 'tarball' to 'download'
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
| -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}" | 
