diff options
| author | Adam Vandenberg | 2009-07-30 11:57:24 -0700 |
|---|---|---|
| committer | Max Howell | 2009-07-31 00:29:58 +0100 |
| commit | 27f46b1180e0b583ef9f62e2cf30fbbbdf0b7a21 (patch) | |
| tree | 9b19b506059cd7fd54bf913153961299f4f3a065 /Library | |
| parent | 5085980dcb611f17e1b18655f8fde38a2b66fa6f (diff) | |
| download | homebrew-27f46b1180e0b583ef9f62e2cf30fbbbdf0b7a21.tar.bz2 | |
Allow brewing without an MD5 hash
You can either have none, in which case a warning is displayed, or
you can have one, but it *must* match.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 5c082e490..ad975ef00 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -129,7 +129,11 @@ class AbstractFormula tgz=Pathname.new(fetch()).realpath begin md5=`md5 -q "#{tgz}"`.strip - raise "MD5 mismatch: #{md5}" unless @md5 and md5 == @md5.downcase + if @md5 and not @md5.empty? + raise "MD5 mismatch: #{md5}" unless md5 == @md5.downcase + else + ohai "Warning: Formula does not provide an MD5 hash." + end # we make an additional subdirectory so know exactly what we are # recursively deleting later |
