From d274d37263e99193567606ac2b7929bc64dba091 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 5 Jan 2012 11:57:24 -0600 Subject: [PATCH] Tab: handle non-core kegs without receipts Passing Formula.factory the name of a keg that belongs to a non-core formula will cause an error to be raised; we don't really care, so just fake a totally empty install receipt in this case. Signed-off-by: Jack Nagel --- Library/Homebrew/tab.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index ec80b0204f..3dd33302f4 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -33,7 +33,11 @@ class Tab < OpenStruct if path.exist? self.from_file path else - self.dummy_tab Formula.factory(keg.parent.basename) + begin + self.dummy_tab Formula.factory(keg.parent.basename) + rescue FormulaUnavailableError + Tab.new :used_options => [], :unused_options => [] + end end end