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
commit79634fe3088bf582eb991f37620063248bd859aa (patch)
treed99467f5c10f982ed565f5810ab291070d5ac346 /Library
parenteb2b3a76d2294a44d39c4cc9d94c059de5316940 (diff)
downloadhomebrew-79634fe3088bf582eb991f37620063248bd859aa.tar.bz2
Note how to redownload tarballs on failed checksum.
Fixes #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"