Skip to content
Snippets Groups Projects
Unverified Commit 3f348286 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

cmd/leaves: handle missing formula.

Use `runtime_formula_dependencies` which does this for us.

Fixes #6827.
parent cf1002b8
No related branches found
No related tags found
No related merge requests found
......@@ -22,16 +22,8 @@ module Homebrew
leaves_args.parse
installed = Formula.installed.sort
deps_of_installed = installed.flat_map do |f|
f.runtime_dependencies.map do |dep|
dep.to_formula.full_name
rescue FormulaUnavailableError
dep.name
end
end
leaves = installed.map(&:full_name) - deps_of_installed
deps_of_installed = installed.flat_map(&:runtime_formula_dependencies)
leaves = installed.map(&:full_name) - deps_of_installed.map(&:full_name)
leaves.each(&method(:puts))
end
end
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