diff options
| author | Mike McQuaid | 2014-03-17 10:45:46 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-17 10:45:46 +0000 |
| commit | d3c8e2f9cb78b5b78f95729e8c60fb5ad6daf90d (patch) | |
| tree | 915f5147376d7493a53815c19876e9ccc6d6e6f2 /Library | |
| parent | f115260a29d387a36399327056ee0a9fa5117c33 (diff) | |
| download | brew-d3c8e2f9cb78b5b78f95729e8c60fb5ad6daf90d.tar.bz2 | |
brew-pull: handle syntax errors in formulae.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-pull.rb | 6 |
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 |
