receipt_path: Ensure the bottle contains INSTALL_RECEIPT.json

This commit is contained in:
Shaun Jackman 2017-09-25 11:10:36 -07:00
parent cb139ca381
commit 1e57445eca

View File

@ -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)