diff options
| author | Jack Nagel | 2012-08-21 15:51:59 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-21 15:55:20 -0500 |
| commit | 5e0cbdab9bfe0db2d5f8e3c68a8d848f1742b27c (patch) | |
| tree | 45c90cf2ebf9bf1f7ed94811b0ced728bee19e72 /Library | |
| parent | 98b6f2451062e0e4c61ad39c962157b21852e4ee (diff) | |
| download | brew-5e0cbdab9bfe0db2d5f8e3c68a8d848f1742b27c.tar.bz2 | |
factory: rescue NameError
Due to the new const_defined? checks, passing certain names (such as
those that start with a digit) that are illegal constant names will
raise NameError. Catch this and error out gracefully, as we would have
previously.
Fixes Homebrew/homebrew#14342.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index f2638bc02..96ea65ba0 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -403,7 +403,7 @@ class Formula return klass.new(name) if install_type == :from_name return klass.new(name, target_file) - rescue LoadError + rescue LoadError, NameError raise FormulaUnavailableError.new(name) end |
