aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-08-21 15:51:59 -0500
committerJack Nagel2012-08-21 15:55:20 -0500
commit4a36c56ac7b36904712aa472b9bd50ef1b0c80d3 (patch)
tree2c93cbb3d81c36451e0f8c732a8b0599f7cc5e33 /Library
parenta4e3cc304f65e551b92941f2fcca2647c0a4f9d6 (diff)
downloadhomebrew-4a36c56ac7b36904712aa472b9bd50ef1b0c80d3.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 #14342. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb2
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