Skip to content

Commit 8b10196

Browse files
committed
Doc: Manpages: Fix dependencies
Add missing on the odoc package. 'Unix.open_process_args_in' only works in the intended way on >=4.12. Instead use 'Filename.quote_command', which requires 4.10.
1 parent 3c7ba96 commit 8b10196

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

doc/dune

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
(rule
2+
(deps
3+
(package odoc))
24
(action
35
(with-stdout-to
46
manpage.gen.mld
@@ -7,8 +9,7 @@
79
(rule
810
(alias runtest)
911
(enabled_if
10-
(> %{ocaml_version} 4.08))
11-
(package odoc)
12+
(> %{ocaml_version} 4.10))
1213
(action
1314
(diff manpage.mld manpage.gen.mld)))
1415

doc/gen_manpage/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(executable
22
(name gen_manpage)
33
(enabled_if
4-
(> %{ocaml_version} 4.08))
4+
(> %{ocaml_version} 4.10))
55
(libraries astring unix))

doc/gen_manpage/gen_manpage.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
open Astring
55

66
let with_process_in cmd args f =
7-
let inp = Unix.open_process_args_in cmd (Array.of_list (cmd :: args)) in
7+
let inp = Unix.open_process_in (Filename.quote_command cmd args) in
88
let finally () = ignore (Unix.close_process_in inp) in
99
Fun.protect ~finally (fun () -> f inp)
1010

0 commit comments

Comments
 (0)