package opam-core

  1. Overview
  2. Docs

Configuration options for the core lib (record, global reference and setter)

module E : sig ... end
type t = private {
  1. debug_level : int;
    (*

    Controls debug messages, 0 to disable

    *)
  2. debug_sections : OpamStd.Config.sections;
    (*

    Controls which sections display debugging messages. If empty, all messages are displayed.

    *)
  3. verbose_level : OpamStd.Config.level;
    (*

    Controls printing of external commands and output, 0 to disable, more means print more low-level commands

    *)
  4. color : OpamStd.Config.when_;
    (*

    Console ANSI color control

    *)
  5. utf8 : OpamStd.Config.when_ext;
    (*

    Controls usage of UTF8 in OPAM-generated messages. Extended adds camel emojis

    *)
  6. disp_status_line : OpamStd.Config.when_;
    (*

    Controls on-line display of parallel commands being run, using ANSI escapes

    *)
  7. confirm_level : [ OpamStd.Config.answer | `undefined ];
  8. yes : bool option;
    (*

    Affects interactive questions in OpamConsole: used to compute the automatic ansering level

    *)
  9. safe_mode : bool;
    (*

    Fail on writes or delays, don't ask questions (for quick queries, e.g. for shell completion)

    *)
  10. log_dir : string;
    (*

    Where to store log and temporary files (output from commands...)

    *)
  11. keep_log_dir : bool;
    (*

    Whether to cleanup temporary and log files on exit

    *)
  12. errlog_length : int;
    (*

    The number of log lines displayed on process error. 0 for all

    *)
  13. merged_output : bool;
    (*

    If set, stderr of commands is merged into their stdout

    *)
  14. precise_tracking : bool;
    (*

    If set, will take full md5 of all files when checking diffs (to track installations), rather than rely on just file size and mtime

    *)
  15. cygbin : string option;
  16. set : bool;
    (*

    Options have not yet been initialised (i.e. defaults are active)

    *)
}
type 'a options_fun = ?debug_level:int -> ?debug_sections:OpamStd.Config.sections -> ?verbose_level:OpamStd.Config.level -> ?color:OpamStd.Config.when_ -> ?utf8:OpamStd.Config.when_ext -> ?disp_status_line:OpamStd.Config.when_ -> ?confirm_level:OpamStd.Config.answer -> ?yes:bool option -> ?safe_mode:bool -> ?log_dir:string -> ?keep_log_dir:bool -> ?errlog_length:int -> ?merged_output:bool -> ?precise_tracking:bool -> ?cygbin:string -> 'a
val default : t
val set : t -> (unit -> t) options_fun
val setk : (t -> 'a) -> t -> 'a options_fun
val r : t ref
val update : ?noop:_ -> (unit -> unit) options_fun
val init : ?noop:_ -> (unit -> unit) options_fun

Sets the OpamCoreConfig options, reading the environment to get default values when unspecified

val initk : 'a -> 'a options_fun

Like init, but returns the given value. For optional argument stacking

val answer_is : OpamStd.Config.answer -> bool

Automatic answering levels * `ask: prompt and ask user * `all_no: answer no to all opam questions * `all_yes: answer yes to all opam questions * `unsafe_yes: answer yes to all opam question and launch system package command wit non interactive options If confirm-level is set (from cli or environment variable), its value is returned. Otherwise, is takes last yes/no cli flag. For environment variables, if OPAMYES is set to true, it has priority over OPAMNO. As other environment variables, cli flags content is taken if given. answer_is and answer_is_yes computes the answer lazily, use answer in case of config update.

val answer_is_yes : unit -> bool
val answer : unit -> OpamStd.Config.answer
val developer : bool

true if OPAM was compiled in developer mode

OCaml

Innovation. Community. Security.