From a755bec6a83cf36ceaca1161cd97777f8d9f7ca2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 10 Dec 2019 16:56:10 +0000 Subject: [PATCH] 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. --- Library/Homebrew/formula.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 26e2e5eba7..de4d3f69a6 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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