aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/fetch.rb
diff options
context:
space:
mode:
authorJack Nagel2012-04-02 21:03:34 -0500
committerJack Nagel2012-04-02 21:04:30 -0500
commit227ee505b0cbc0ea6e296b4f9b28cd93a16ee83d (patch)
tree840add99a0fa6ea39e4a84083350baeb3931d91a /Library/Homebrew/cmd/fetch.rb
parenta947064994f020276b16007ebc9aa04af91189c3 (diff)
downloadbrew-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>
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
-rw-r--r--Library/Homebrew/cmd/fetch.rb3
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