Display md5 mismatch if that fails

This commit is contained in:
Max Howell 2009-05-21 17:54:14 +01:00
parent 9554f771cc
commit b659838993

View File

@ -59,7 +59,8 @@ class Formula
FileUtils.mkpath appsupport unless File.exist? appsupport
Dir.chdir appsupport do
tgz=Pathname.new fetch()
raise "MD5 mismatch" unless `md5 -q "#{tgz}"`.strip == @md5.downcase
md5=`md5 -q "#{tgz}"`.strip
raise "MD5 mismatch: #{md5}" unless md5 == @md5.downcase
# we make an additional subdirectory so know exactly what we are
# recursively deleting later