package oasis

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Running commands

  • author Sylvain Le Gall
val run : ctxt:OASISContext.t -> ?f_exit_code:(int -> unit) -> ?quote:bool -> OASISTypes.prog -> OASISTypes.args -> unit

Run a command.

  • parameter f_exit_code

    if provided, run this command on the exit code (even when it is 0). Otherwise, a non-zero exit code raises Failure.

  • parameter quote

    quote the prog.

val run_read_output : ctxt:OASISContext.t -> ?f_exit_code:(int -> unit) -> OASISTypes.prog -> OASISTypes.args -> string list

Run a command and returns its output as a list of lines.

val run_read_one_line : ctxt:OASISContext.t -> ?f_exit_code:(int -> unit) -> OASISTypes.prog -> OASISTypes.args -> string

Run a command and returns only first line.

  • raises Failure

    if the output contains more than one line.

OCaml

Innovation. Community. Security.