diff options
| author | Jack Nagel | 2014-06-15 18:27:37 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-15 20:23:20 -0500 |
| commit | 6e1450e974803e4b7c61f91d03fb55d5de416232 (patch) | |
| tree | 7c8c2cb5626f020d08c5545b8863e4d4d420653a /Library/Homebrew | |
| parent | 9c4d309a80ba40bfe57f2bb7861a40752c8f1841 (diff) | |
| download | brew-6e1450e974803e4b7c61f91d03fb55d5de416232.tar.bz2 | |
Handle illegal constant names when fetching remote formulae
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formulary.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 31a7fd51e..da64a43e5 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -141,7 +141,13 @@ class Formulary # Downloads the formula's .rb file def fetch - unless Formulary.formula_class_defined? class_name + begin + have_klass = Formulary.formula_class_defined? class_name + rescue NameError + raise FormulaUnavailableError.new(name) + end + + unless have_klass HOMEBREW_CACHE_FORMULA.mkpath FileUtils.rm path.to_s, :force => true curl url, '-o', path.to_s |
