formula: handle missing runtime dependency formulae.

This is most likely an old formula with bad dependency data so output
the path so it can be uninstalled.
This commit is contained in:
Mike McQuaid 2019-12-10 16:56:10 +00:00
parent 36a7fe59d9
commit a755bec6a8
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -1546,8 +1546,13 @@ class Formula
Dependency.new full_name
end.compact
end
deps ||= declared_runtime_dependencies unless undeclared
deps ||= (declared_runtime_dependencies | undeclared_runtime_dependencies)
begin
deps ||= declared_runtime_dependencies unless undeclared
deps ||= (declared_runtime_dependencies | undeclared_runtime_dependencies)
rescue FormulaUnavailableError
onoe "could not get runtime dependencies from #{path}!"
deps ||= []
end
deps
end