aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-12-31 11:13:45 -0500
committerJack Nagel2014-12-31 17:28:21 -0500
commit6a9ee4efd10ada1d75c5c52d44f2c29f27a86123 (patch)
tree01eeb94c6f931fe2c2a153f9f9af5f3b1a7e2058
parent6cb7a3345f32e629182aea6397ab3862c0561eb5 (diff)
downloadhomebrew-6a9ee4efd10ada1d75c5c52d44f2c29f27a86123.tar.bz2
Check file existence instead of rescuing LoadError
-rw-r--r--Library/Homebrew/formulary.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 37ca80b90..b6ac6a98c 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