Skip to content
Snippets Groups Projects
Unverified Commit cc7b62c8 authored by Rylan Polster's avatar Rylan Polster Committed by GitHub
Browse files

Merge pull request #11516 from Rylan12/bottle-hash-improvements

formula: improve `to_recursive_bottle_hash`
parents bcb7d29a 4de44c77
No related branches found
No related tags found
No related merge requests found
......@@ -1919,17 +1919,19 @@ class Formula
[tag.to_s, info]
end.to_h
return bottles unless top_level
hash = {
"name" => name,
"pkg_version" => pkg_version,
"rebuild" => bottle["rebuild"],
"bottles" => bottles,
}
dependencies = declared_runtime_dependencies.map do |dep|
return hash unless top_level
hash["dependencies"] = declared_runtime_dependencies.map do |dep|
dep.to_formula.to_recursive_bottle_hash(top_level: false)
end
{
"name" => name,
"bottles" => bottles,
"dependencies" => dependencies,
}
hash
end
# Returns the bottle information for a formula
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment