From 6b127d54c21173ffa16c6cbf8a15be4a02b46cb2 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 18 Apr 2022 17:02:19 +0100 Subject: [PATCH] update to cmdliner 1.1.0 api --- bin/bin/convert_md.ml | 9 ++++----- dune-project | 2 +- rwo.opam | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/bin/convert_md.ml b/bin/bin/convert_md.ml index 2c540ac27..34ce5624b 100644 --- a/bin/bin/convert_md.ml +++ b/bin/bin/convert_md.ml @@ -241,9 +241,8 @@ let out_type = let main = let doc = "Pre-process markdown files to produce OCaml code." in - let exits = Term.default_exits in - Term.(const run $ file $ output $ out_type), - Term.info "output" ~doc ~exits - (* Term.(ret (const main $ Cli.setup)), *) + let exits = Cmd.Exit.defaults in + let term = Term.(const run $ file $ output $ out_type) in + Cmd.(v (info "output"~doc ~exits) term) -let () = Term.(exit_status @@ eval main) +let () = exit @@ Cmd.eval' ~catch:false main diff --git a/dune-project b/dune-project index eeb599b0c..6f092e708 100644 --- a/dune-project +++ b/dune-project @@ -23,7 +23,7 @@ second edition book. See https://realworldocaml.org/") async atdgen base - cmdliner + (cmdliner (>= 1.1.0)) cohttp-async conf-ncurses conf-tzdata diff --git a/rwo.opam b/rwo.opam index 6d503add8..76e7dfa06 100644 --- a/rwo.opam +++ b/rwo.opam @@ -16,7 +16,7 @@ depends: [ "async" "atdgen" "base" - "cmdliner" + "cmdliner" {>= "1.1.0"} "cohttp-async" "conf-ncurses" "conf-tzdata"