Skip to content
Browse files

grep with --exclude was resulting in hits on files with names like 'a…

…pp/models/.svn/text-base/reading_list.rb.svn-base'. Piping through an additional grep process seems a little wasteful, but it does the job for folks who have an app on Subversion.
  • Loading branch information...
1 parent 56b0337 commit 7a69f41cb5789bfff75c643a3b8fcd3c543e146e @tcopeland tcopeland committed Sep 20, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/application_checker.rb
View
4 lib/application_checker.rb
@@ -378,9 +378,9 @@ def find_with_grep(text, where, double_quote, perl_regex = false)
value = ""
# Specifically double quote for finding 'test_help'
command = if double_quote
- "grep -r #{"-P" if perl_regex} --exclude=\*.svn\* \"#{text}\" #{where}"
+ "grep -r #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn"
else
- "grep -r #{"-P" if perl_regex} --exclude=\*.svn\* '#{text}' #{where}"
+ "grep -r #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn"
end
Open3.popen3(command) do |stdin, stdout, stderr|

0 comments on commit 7a69f41

Please sign in to comment.
Something went wrong with that request. Please try again.