aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-01-11 11:01:22 -0800
committerGitHub2017-01-11 11:01:22 -0800
commit2fcf349c9972c475f06589cfced822ab5a7b39ea (patch)
treeab015b1eb3bb1e5698828c852a35565690529d91
parent9cce3414fbd39d146d97911dbb3bf07fffaa1080 (diff)
parentd8adae0f92fcf6685d8fc8a1a44e6a11db30fac0 (diff)
downloadbrew-2fcf349c9972c475f06589cfced822ab5a7b39ea.tar.bz2
Merge pull request #1812 from MikeMcQuaid/formulary-read-keg-formula
formulary: read from formula in opt prefix.
-rw-r--r--Library/Homebrew/formulary.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index fadd89457..25df57cdc 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -380,6 +380,11 @@ class Formulary
return TapLoader.new(possible_tap_newname_formulae.first, from: from)
end
+ possible_keg_formula = Pathname.new("#{HOMEBREW_PREFIX}/opt/#{ref}/.brew/#{ref}.rb")
+ if possible_keg_formula.file?
+ return FormulaLoader.new(ref, possible_keg_formula)
+ end
+
possible_cached_formula = Pathname.new("#{HOMEBREW_CACHE_FORMULA}/#{ref}.rb")
if possible_cached_formula.file?
return FormulaLoader.new(ref, possible_cached_formula)