From 5bf92cd7ca76a4996941f9dc80a251dad2a22d86 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 31 Dec 2014 11:13:45 -0500 Subject: [PATCH] Check file existence instead of rescuing LoadError --- Library/Homebrew/formulary.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 37ca80b901..b6ac6a98ce 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -72,11 +72,8 @@ class Formulary def load_file STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug? - begin - require(path) - rescue LoadError => e - raise FormulaUnavailableError, name, e.backtrace - end + raise FormulaUnavailableError.new(name) unless path.file? + require(path) end end