lib/specinfra/command/base.rb in specinfra-1.25.1 vs lib/specinfra/command/base.rb in specinfra-1.25.2
- old
+ new
@@ -140,14 +140,14 @@
def check_file_contain(file, expected_pattern)
"#{check_file_contain_with_regexp(file, expected_pattern)} || #{check_file_contain_with_fixed_strings(file, expected_pattern)}"
end
def check_file_contain_with_regexp(file, expected_pattern)
- "grep -q -- #{escape(expected_pattern)} #{escape(file)}"
+ "grep -qs -- #{escape(expected_pattern)} #{escape(file)}"
end
def check_file_contain_with_fixed_strings(file, expected_pattern)
- "grep -qF -- #{escape(expected_pattern)} #{escape(file)}"
+ "grep -qFs -- #{escape(expected_pattern)} #{escape(file)}"
end
def check_file_checksum(file, expected)
regexp = "^#{expected}"
"cksum #{escape(file)} | grep -iw -- #{escape(regexp)}"