Preserve quotes on certain flags that contain spaces (#200)

This is useful, for example, if one needs to pass specific  flags
by hand (due to the need to use old libraries for example).  Fixes
#198

Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
This commit is contained in:
Marcello Seri 2017-07-25 11:38:47 +01:00 committed by Jérémie Dimino
parent 6e48e70a74
commit 8bace6bc3b
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ let dot_merlin sctx ~dir ({ requires; flags; _ } as t) =
let flags =
match flags with
| [] -> []
| _ -> ["FLG " ^ String.concat flags ~sep:" "]
| _ ->
let escaped_flags = List.map ~f:quote_for_shell flags in
["FLG " ^ String.concat escaped_flags ~sep:" "]
in
let dot_merlin =
List.concat