opam-client

Client library for opam 2.1
Module OpamCliMain
val check_and_run_external_commands : unit -> OpamCLIVersion.Sourced.t * string list

Handles calling opam plugins (à la git). E.g. opam publish runs opam-publish from PATH, with specific addition of OpamPath.plugins_bin and the current switch bin directory).

Note that this does load some configuration and env, but only handles a leading --yes argument.

  • raises InvalidCLI
val main_catch_all : ( unit -> unit ) -> unit

Handles flushing buffers and catching exceptions from the main call, including special cases like OpamStd.Sys.Exec that is expected to do a Unix.exec, but after all proper cleanup has been done.

val json_out : unit -> unit

Handling of debug JSON output, according to OpamClientConfig.json_out

val run : unit -> unit

run default command_list runs command-line argument parsing and processing of the command

val main : unit -> unit

Default entry point with handling of debug finalisers