From cbdae476d9f603ba6eefc8c93a67e97d6b20b48e Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Fri, 8 Apr 2011 09:19:30 +1000 Subject: [PATCH] Pass the H option to grep to ALWAYS show the filename --- lib/application_checker.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/application_checker.rb b/lib/application_checker.rb index 4b87c18..f4cef30 100644 --- a/lib/application_checker.rb +++ b/lib/application_checker.rb @@ -378,11 +378,11 @@ module Rails value = "" # Specifically double quote for finding 'test_help' command = if double_quote - "grep -r #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn" + "grep -rH #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn" else - "grep -r #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn" + "grep -rH #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn" end - + Open3.popen3(command) do |stdin, stdout, stderr| value = stdout.read end