formula#to_hash: record requirements
Closes Homebrew/homebrew#40451. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
c6e1090c43
commit
f8efea0cf3
@ -749,6 +749,15 @@ class Formula
|
|||||||
"caveats" => caveats
|
"caveats" => caveats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hsh["requirements"] = requirements.map do |req|
|
||||||
|
{
|
||||||
|
"name" => req.name,
|
||||||
|
"default_formula" => req.default_formula,
|
||||||
|
"cask" => req.cask,
|
||||||
|
"download" => req.download
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
hsh["options"] = options.map { |opt|
|
hsh["options"] = options.map { |opt|
|
||||||
{ "option" => opt.flag, "description" => opt.description }
|
{ "option" => opt.flag, "description" => opt.description }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user