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>
This commit is contained in:
Jack Nagel 2012-04-02 21:03:34 -05:00
parent a947064994
commit 227ee505b0

View File

@ -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