aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-03-17 10:45:46 +0000
committerMike McQuaid2014-03-17 10:45:46 +0000
commitd3c8e2f9cb78b5b78f95729e8c60fb5ad6daf90d (patch)
tree915f5147376d7493a53815c19876e9ccc6d6e6f2 /Library
parentf115260a29d387a36399327056ee0a9fa5117c33 (diff)
downloadbrew-d3c8e2f9cb78b5b78f95729e8c60fb5ad6daf90d.tar.bz2
brew-pull: handle syntax errors in formulae.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-pull.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb
index 84342ed55..42ab844ea 100755
--- a/Library/Contributions/cmd/brew-pull.rb
+++ b/Library/Contributions/cmd/brew-pull.rb
@@ -81,8 +81,10 @@ ARGV.named.each do |arg|
status, filename = line.split
# Don't try and do anything to removed files.
if (status =~ /A|M/) && (filename =~ %r{Formula/.+\.rb$}) || tap(url)
- formula = File.basename(filename, '.rb')
- changed_formulae << Formula.factory(formula)
+ formula_name = File.basename(filename, '.rb')
+ formula = Formula[formula_name] rescue nil
+ next unless formula
+ changed_formulae << formula
end
end