Skip to content

Commit df626e0

Browse files
committed
Driver: create directory if needed
1 parent 454615b commit df626e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/driver/landing_pages.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
open Packages
22
open Odoc_unit
3-
let write_file file content = Bos.OS.File.write file content |> Result.get_ok
43

54
let make_unit ~odoc_dir ~odocl_dir ~mld_dir ~output_dir rel_path ~content
65
?(include_dirs = []) ~pkgname ~pkg_args () =
76
let input_file = Fpath.(mld_dir // rel_path / "index.mld") in
87
let odoc_file = Fpath.(odoc_dir // rel_path / "page-index.odoc") in
98
let odocl_file = Fpath.(odocl_dir // rel_path / "page-index.odocl") in
10-
let () = write_file input_file content in
9+
let () = Util.write_file input_file (String.split_on_char '\n' content) in
1110
let parent_id = rel_path |> Odoc.Id.of_fpath in
1211
{
1312
parent_id;

0 commit comments

Comments
 (0)