aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorShaun Jackman2017-09-25 11:10:36 -0700
committerShaun Jackman2017-09-27 09:36:41 -0700
commit1e57445eca12e45896010aead6226f0f4c1df473 (patch)
tree0433ed7c4a45c3b17a8589dbcb6ff15d02053a1f /Library
parentcb139ca381cb7f00a4dfdc21482515f103aed417 (diff)
downloadbrew-1e57445eca12e45896010aead6226f0f4c1df473.tar.bz2
receipt_path: Ensure the bottle contains INSTALL_RECEIPT.json
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils/bottles.rb4
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)