From: Richard W.M. Jones Date: Sat, 26 Oct 2013 14:15:38 +0000 (+0100) Subject: Fix file_contains_string so it matches exact strings, not regexps. X-Git-Tag: v0.3~5 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=bd08c0a87a906c312deeed28f55bd94e76fecac7;p=goaljobs.git Fix file_contains_string so it matches exact strings, not regexps. --- diff --git a/goaljobs.ml b/goaljobs.ml index fcbcf23..4024b6d 100644 --- a/goaljobs.ml +++ b/goaljobs.ml @@ -216,7 +216,7 @@ let url_exists url = goal_failed msg let file_contains_string filename str = - let cmd = sprintf "grep -q %s %s" (quote str) (quote filename) in + let cmd = sprintf "grep -q -F %s %s" (quote str) (quote filename) in match Sys.command cmd with | 0 -> true | 1 -> false