Skip to content

Commit ad2569c

Browse files
committed
Cmdliner v2
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 1ddb8e9 commit ad2569c

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

compiler/bin-jsoo_minify/jsoo_minify.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ let main =
9191
let t = Cmdliner.Term.(const f $ Cmd_arg.options) in
9292
Cmdliner.Cmd.v Cmd_arg.info t
9393

94-
let (_ : int) =
94+
let exit_code =
9595
try Cmdliner.Cmd.eval ~catch:false ~argv:Sys.argv main with
9696
| (Match_failure _ | Assert_failure _ | Not_found) as exc ->
9797
let backtrace = Printexc.get_backtrace () in
@@ -108,3 +108,5 @@ let (_ : int) =
108108
| exc ->
109109
Format.eprintf "%s: Error: %s@." Sys.argv.(0) (Printexc.to_string exc);
110110
exit 1
111+
112+
let () = exit exit_code

compiler/bin-wasm_of_ocaml/wasmoo_link_wasm.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
open Js_of_ocaml_compiler.Stdlib
2121

22-
let (_ : int) =
22+
let exit_code =
2323
try Cmdliner.Cmd.eval ~catch:false ~argv:Sys.argv Link_wasm.command with
2424
| (Match_failure _ | Assert_failure _ | Not_found) as exc ->
2525
let backtrace = Printexc.get_backtrace () in
@@ -36,3 +36,5 @@ let (_ : int) =
3636
| exc ->
3737
Format.eprintf "%s: Error: %s@." Sys.argv.(0) (Printexc.to_string exc);
3838
exit 1
39+
40+
let () = exit exit_code

dune-project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
(ppxlib (>= 0.35))
2424
(ocaml-compiler-libs (>= v0.12.4))
2525
(re :with-test)
26-
(cmdliner (>= 1.1.0))
26+
(cmdliner (>= 2.0))
2727
(sedlex (>= 3.3))
2828
(qcheck :with-test)
2929
menhir
@@ -143,7 +143,7 @@
143143
(ppx_expect (and (>= v0.14.2) :with-test))
144144
(ppxlib (>= 0.35))
145145
(re :with-test)
146-
(cmdliner (>= 1.1.0))
146+
(cmdliner (>= 2.0))
147147
(opam-format :with-test)
148148
(sedlex (>= 2.3))
149149
menhir

js_of_ocaml-compiler.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ depends: [
1919
"ppxlib" {>= "0.35"}
2020
"ocaml-compiler-libs" {>= "v0.12.4"}
2121
"re" {with-test}
22-
"cmdliner" {>= "1.1.0"}
22+
"cmdliner" {>= "2.0"}
2323
"sedlex" {>= "3.3"}
2424
"qcheck" {with-test}
2525
"menhir"

wasm_of_ocaml-compiler.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ depends: [
1919
"ppx_expect" {>= "v0.14.2" & with-test}
2020
"ppxlib" {>= "0.35"}
2121
"re" {with-test}
22-
"cmdliner" {>= "1.1.0"}
22+
"cmdliner" {>= "2.0"}
2323
"opam-format" {with-test}
2424
"sedlex" {>= "2.3"}
2525
"menhir"

0 commit comments

Comments
 (0)