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 <jacknagel@gmail.com>
This commit is contained in:
parent
97fa28248d
commit
d274d37263
@ -33,7 +33,11 @@ class Tab < OpenStruct
|
|||||||
if path.exist?
|
if path.exist?
|
||||||
self.from_file path
|
self.from_file path
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user