Improve compatibility of Configurator.V1.write_flags (#967)
Make sure the produced file will round-trip with both the Dune and Jbuilder lexical conventions. Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
parent
1b53107b66
commit
e7bc884d26
|
@ -487,7 +487,7 @@ end
|
|||
|
||||
let write_flags fname s =
|
||||
let path = Path.in_source fname in
|
||||
let sexp = Usexp.List(List.map ~f:Usexp.atom_or_quoted_string s) in
|
||||
let sexp = Usexp.List (List.map s ~f:(fun s -> Usexp.Quoted_string s)) in
|
||||
Io.write_file path (Usexp.to_string sexp ~syntax:Dune)
|
||||
|
||||
let main ?(args=[]) ~name f =
|
||||
|
|
Loading…
Reference in New Issue