Merge branch 'master' of github.com:Homebrew/brew into update-compiler-docs

This commit is contained in:
Afnan Enayet 2018-07-06 23:45:37 -04:00
commit 84b03c5a50
No known key found for this signature in database
GPG Key ID: 9C669708328BC5A4
2 changed files with 4 additions and 2 deletions

View File

@ -1518,7 +1518,7 @@ class Formula
# Returns a list of Dependency objects that are required at runtime.
# @private
def runtime_dependencies(read_from_tab: true)
def runtime_dependencies(read_from_tab: true, undeclared: true)
if read_from_tab &&
(keg = opt_or_installed_prefix_keg) &&
(tab_deps = keg.runtime_dependencies)
@ -1529,6 +1529,7 @@ class Formula
end.compact
end
return declared_runtime_dependencies unless undeclared
declared_runtime_dependencies | undeclared_runtime_dependencies
end

View File

@ -149,7 +149,8 @@ class LinkageChecker
declared_deps_names = declared_deps_full_names.map do |dep|
dep.split("/").last
end
recursive_deps = formula.declared_runtime_dependencies.map do |dep|
recursive_deps = formula.runtime_dependencies(undeclared: false)
.map do |dep|
begin
dep.to_formula.name
rescue FormulaUnavailableError