aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-18 13:42:12 -0700
committerAdam Vandenberg2010-06-18 14:16:20 -0700
commit43d1f6790b777b014c6cbcb11674ad1fdee63abc (patch)
tree502ca0914222467aaeed5a65c5fd5da2ae0af7da /Library
parent78507894577ac03587bc7786254f2a54268fd401 (diff)
downloadbrew-43d1f6790b777b014c6cbcb11674ad1fdee63abc.tar.bz2
Note how to redownload tarballs on failed checksum.
Fixes Homebrew/homebrew#659
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 9471f58b5..7f8b5ebc5 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -371,7 +371,14 @@ private
hash = fn.incremental_hash(hasher)
if supplied and not supplied.empty?
- raise "#{type} mismatch\nExpected: #{supplied}\nGot: #{hash}\nArchive: #{fn}" unless supplied.upcase == hash.upcase
+ message = <<-EOF
+#{type} mismatch
+Expected: #{supplied}
+Got: #{hash}
+Archive: #{fn}
+(To retry an incomplete download, remove the file above.)
+EOF
+ raise message unless supplied.upcase == hash.upcase
else
opoo "Cannot verify package integrity"
puts "The formula did not provide a download checksum"