repair CaskDependent#runtime_dependencies

This commit is contained in:
hyuraku 2022-02-10 00:29:39 +09:00
parent 6d0c6d0604
commit e3f42e6f89
3 changed files with 3 additions and 7 deletions

View File

@ -17,11 +17,8 @@ class CaskDependent
@cask.full_name
end
def runtime_dependencies(ignore_missing: false)
recursive_dependencies(ignore_missing: ignore_missing).reject do |dependency|
tags = dependency.tags
tags.include?(:build) || tags.include?(:test)
end
def runtime_dependencies
deps.map { |deps| [deps, deps.to_formula.runtime_dependencies] }.flatten.uniq
end
def deps

View File

@ -124,7 +124,6 @@ class Dependency
expanded_deps << dep
else
next if @expand_stack.include? dep.name
next if dep.tags.include?(:build)
expanded_deps.concat(expand(dep.to_formula, cache_key: cache_key, ignore_missing: ignore_missing, &block))
expanded_deps << dep

View File

@ -51,7 +51,7 @@ module InstalledDependents
dependent.missing_dependencies(hide: keg_names)
when Cask::Cask
# When checking for cask dependents, we don't care about missing or non-runtime dependencies
CaskDependent.new(dependent).runtime_dependencies(ignore_missing: true).map(&:to_formula)
CaskDependent.new(dependent).runtime_dependencies.map(&:to_formula)
end
required_kegs = required.map do |f|