formula: output recommended/optional deps in JSON.
Fixes Homebrew/homebrew#47914 by distinguishing between required, optional, and recommended dependencies when using `brew info --json=v1`. This is done by adding the `optional_dependencies` and `recommended_dependencies` fields to the JSON output. A good example of this fix is `brew info --json=v1 dtrx`. Closes Homebrew/homebrew#48196. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
b6729191fa
commit
a600262f68
@ -1244,6 +1244,8 @@ class Formula
|
|||||||
"outdated" => outdated?,
|
"outdated" => outdated?,
|
||||||
"keg_only" => keg_only?,
|
"keg_only" => keg_only?,
|
||||||
"dependencies" => deps.map(&:name).uniq,
|
"dependencies" => deps.map(&:name).uniq,
|
||||||
|
"recommended_dependencies" => deps.select(&:recommended?).map(&:name).uniq,
|
||||||
|
"optional_dependencies" => deps.select(&:optional?).map(&:name).uniq,
|
||||||
"conflicts_with" => conflicts.map(&:name),
|
"conflicts_with" => conflicts.map(&:name),
|
||||||
"caveats" => caveats
|
"caveats" => caveats
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user