OpamCliMainexception InvalidCLI of OpamCLIVersion.Sourced.tval check_and_run_external_commands :
unit ->
OpamCLIVersion.Sourced.t * string listHandles 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.
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.
Handling of debug JSON output, according to OpamClientConfig.t.json_out
run default command_list runs command-line argument parsing and processing of the command