Simplify hash merge.
This commit is contained in:
parent
b0dc84b117
commit
023238a761
@ -2239,12 +2239,9 @@ class Formula
|
|||||||
# Take from API, merging in local install status.
|
# Take from API, merging in local install status.
|
||||||
if self.class.loaded_from_api && !Homebrew::EnvConfig.no_install_from_api?
|
if self.class.loaded_from_api && !Homebrew::EnvConfig.no_install_from_api?
|
||||||
json_formula = Homebrew::API::Formula.all_formulae[name].dup
|
json_formula = Homebrew::API::Formula.all_formulae[name].dup
|
||||||
json_formula["name"] = hash["name"]
|
return json_formula.merge(
|
||||||
json_formula["installed"] = hash["installed"]
|
hash.slice("name", "installed", "linked_keg", "pinned", "outdated"),
|
||||||
json_formula["linked_keg"] = hash["linked_keg"]
|
)
|
||||||
json_formula["pinned"] = hash["pinned"]
|
|
||||||
json_formula["outdated"] = hash["outdated"]
|
|
||||||
return json_formula
|
|
||||||
end
|
end
|
||||||
|
|
||||||
variations = {}
|
variations = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user