diff options
| author | Adam Vandenberg | 2009-07-30 11:57:24 -0700 |
|---|---|---|
| committer | Max Howell | 2009-07-31 00:29:58 +0100 |
| commit | ec65bb48190aca260280ef4ce90225af3e4d2d13 (patch) | |
| tree | abe6a258bba9ffb7bb5f9539b843c5abc72831ba | |
| parent | 0dd07b3fdce3bbb1b09a83980bb0f7d618a091aa (diff) | |
| download | brew-ec65bb48190aca260280ef4ce90225af3e4d2d13.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.
| -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 |
