Better md5 mismatch exception

This commit is contained in:
Max Howell 2009-10-24 15:55:53 +01:00
parent e289164adc
commit fc9ea77bb3

View File

@ -275,7 +275,7 @@ private
hash=Digest.const_get(type).hexdigest(fn.read)
if supplied and not supplied.empty?
raise "#{type} mismatch: #{hash}" unless supplied.upcase == hash.upcase
raise "#{type} mismatch\nExpected: #{hash}\nArchive: #{fn}" unless supplied.upcase == hash.upcase
else
opoo "Cannot verify package integrity"
puts "The formula did not provide a download checksum"