From d47f1d083da5403d1298945a675744e98a08ca93 Mon Sep 17 00:00:00 2001 From: rand00 Date: Mon, 21 Feb 2022 15:49:25 +0100 Subject: [PATCH 1/2] opam: Set minimal version of cmdliner to 1.1.0 --- opam-graph.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam-graph.opam b/opam-graph.opam index 8ab3aa8..f885b2e 100644 --- a/opam-graph.opam +++ b/opam-graph.opam @@ -9,7 +9,7 @@ license: "ISC" depends: [ "ocaml" {>= "4.08.0"} "dune" {>= "2.0.0"} - "cmdliner" + "cmdliner" {>= "1.1.0"} "fmt" {>= "0.8.7"} "logs" "opam-core" From 58591483c0f6501ff808f8fac42588fa6054e4df Mon Sep 17 00:00:00 2001 From: rand00 Date: Mon, 21 Feb 2022 15:50:09 +0100 Subject: [PATCH 2/2] Main: Fixed usage of new Cmdliner interface --- app/main.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/main.ml b/app/main.ml index dfc0c83..d51fb19 100644 --- a/app/main.ml +++ b/app/main.ml @@ -62,7 +62,8 @@ let file = Arg.(required & pos 0 (some file) None & info [ ] ~doc ~docv:"FILE") let cmd = - Term.(const jump $ setup_log $ transitive $ file $ output_format), - Term.info "opam_graph" ~version:"%%VERSION%%" + let term = Term.(const jump $ setup_log $ transitive $ file $ output_format) in + let info = Cmd.info "opam_graph" ~version:"%%VERSION%%" in + Cmd.v info term -let () = match Term.eval cmd with `Ok () -> exit 0 | _ -> exit 1 +let () = Cmd.eval cmd |> exit