diff options
| author | Jack Nagel | 2014-06-09 19:53:21 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-09 19:55:31 -0500 |
| commit | ace78b1f3a59a893c7068e485555acf792470080 (patch) | |
| tree | 2ff591b862a5e3c16e69f497a023b44e2324f923 /Library/Homebrew | |
| parent | 277b38f18f1b9f6795008b9c1f2c9a500ed27801 (diff) | |
| download | homebrew-ace78b1f3a59a893c7068e485555acf792470080.tar.bz2 | |
Only do formula class sanity checks once
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formulary.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 31a7fd51e..8342c3ded 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -59,7 +59,9 @@ class Formulary raise FormulaUnavailableError.new(name) end - unless have_klass + if have_klass + Formulary.get_formula_class(class_name) + else STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug? begin require path @@ -71,13 +73,13 @@ class Formulary raise if ARGV.debug? # let's see the REAL error raise FormulaUnavailableError.new(name) end - end - klass = Formulary.get_formula_class(class_name) - if klass == Formula || !(klass < Formula) - raise FormulaUnavailableError.new(name) + klass = Formulary.get_formula_class(class_name) + if klass == Formula || !(klass < Formula) + raise FormulaUnavailableError.new(name) + end + klass end - klass end end |
