aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorBaptiste Fontaine2016-06-17 21:42:43 +0200
committerBaptiste Fontaine2016-06-19 23:35:16 +0200
commitaf94c4fc50384924752bc917f6a56b28f257500f (patch)
tree4592bab501eb0707691ebba344dcee777e303199 /Library/Homebrew
parentcad85754cf17c468ccda1d76022e680ba8c9455d (diff)
downloadbrew-af94c4fc50384924752bc917f6a56b28f257500f.tar.bz2
pull: skip non-ruby files when collecting formulae names
Closes #377. Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/pull.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 073ede253..c3d8d1e8f 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -113,13 +113,9 @@ module Homebrew
"git", "diff-tree", "-r", "--name-only",
"--diff-filter=AM", orig_revision, "HEAD", "--", tap.formula_dir.to_s
).each_line do |line|
+ next unless line.end_with? ".rb\n"
name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
- begin
- changed_formulae_names << name
- # Make sure we catch syntax errors.
- rescue Exception
- next
- end
+ changed_formulae_names << name
end
end
@@ -127,7 +123,13 @@ module Homebrew
changed_formulae_names.each do |name|
next if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"]
- f = Formula[name]
+ begin
+ f = Formula[name]
+ # Make sure we catch syntax errors.
+ rescue Exception
+ next
+ end
+
if ARGV.include? "--bottle"
if f.bottle_unneeded?
ohai "#{f}: skipping unneeded bottle."