From 0990fbaac4d31e8522a3d4ac285398fd8618ad85 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 15 Jul 2018 17:03:50 +0100 Subject: [PATCH] formulary: catch argument errors. Reraise as a `FormulaUnreadableError` as these are formulae that have mistakes that cannot be trivially repaired. Fixes #4475. Fixes #4476. --- Library/Homebrew/formulary.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index d5a0baeba6..46bd825e2a 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -24,7 +24,7 @@ module Formulary const_set(namespace, mod) begin mod.module_eval(contents, path) - rescue ScriptError => e + rescue ArgumentError, ScriptError => e raise FormulaUnreadableError.new(name, e) end class_name = class_s(name)