Skip to content

Commit

Permalink
fetch: don't display cached location twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jacknagel committed Apr 3, 2012
1 parent e827884 commit f66238b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/cmd/fetch.rb
Expand Up @@ -26,6 +26,7 @@ def fetch
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

Expand All @@ -35,7 +36,7 @@ def fetch
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
Expand Down

0 comments on commit f66238b

Please sign in to comment.