diff options
| author | Shaun Jackman | 2017-09-25 11:10:36 -0700 |
|---|---|---|
| committer | Shaun Jackman | 2017-09-27 09:36:41 -0700 |
| commit | 1e57445eca12e45896010aead6226f0f4c1df473 (patch) | |
| tree | 0433ed7c4a45c3b17a8589dbcb6ff15d02053a1f /Library/Homebrew | |
| parent | cb139ca381cb7f00a4dfdc21482515f103aed417 (diff) | |
| download | brew-1e57445eca12e45896010aead6226f0f4c1df473.tar.bz2 | |
receipt_path: Ensure the bottle contains INSTALL_RECEIPT.json
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/utils/bottles.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index 927963bc1..73353496a 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -29,9 +29,11 @@ module Utils end def receipt_path(bottle_file) - Utils.popen_read("tar", "-tzf", bottle_file).lines.map(&:chomp).find do |line| + path = Utils.popen_read("tar", "-tzf", bottle_file).lines.map(&:chomp).find do |line| line =~ %r{.+/.+/INSTALL_RECEIPT.json} end + raise "This bottle does not contain the file INSTALL_RECEIPT.json: #{bottle_file}" unless path + path end def resolve_formula_names(bottle_file) |
