aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 2bdaca752..7577edb9e 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -217,10 +217,15 @@ class Formulary
tap = tab.tap
spec ||= tab.spec
- if tap.nil? || tap == "Homebrew/homebrew"
+ if tap.nil?
factory(rack.basename.to_s, spec)
else
- factory("#{tap.sub("homebrew-", "")}/#{rack.basename}", spec)
+ begin
+ factory("#{tap}/#{rack.basename}", spec)
+ rescue FormulaUnavailableError
+ # formula may be migrated to different tap. Try to search in core and all taps.
+ factory(rack.basename.to_s, spec)
+ end
end
end