diff options
| author | Jack Nagel | 2012-04-02 21:03:34 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-04-02 21:04:30 -0500 | 
| commit | 227ee505b0cbc0ea6e296b4f9b28cd93a16ee83d (patch) | |
| tree | 840add99a0fa6ea39e4a84083350baeb3931d91a | |
| parent | a947064994f020276b16007ebc9aa04af91189c3 (diff) | |
| download | brew-227ee505b0cbc0ea6e296b4f9b28cd93a16ee83d.tar.bz2 | |
fetch: don't display cached location twice
The download strategy will print the cached location if we've already
fetched it, so avoid printing redundant information.
Also just "puts" it instead of using a second `ohai` line.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 7d7a28459..bf7da0935 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -26,6 +26,7 @@ module Homebrew extend self          FileUtils.rm_rf where_to if File.exist? where_to        end +      already_downloaded = f.cached_download.exist?        the_tarball, _ = f.fetch        next unless the_tarball.kind_of? Pathname @@ -35,7 +36,7 @@ module Homebrew extend self        previous_sha1 = f.instance_variable_get(:@sha1).to_s.downcase        previous_sha2 = f.instance_variable_get(:@sha256).to_s.downcase unless bottle -      ohai "Downloaded to: #{the_tarball}" +      puts "Downloaded to: #{the_tarball}" unless already_downloaded        puts "MD5:  #{the_tarball.md5}" unless bottle        puts "SHA1: #{the_tarball.sha1}"        puts "SHA256: #{the_tarball.sha2}" unless bottle | 
