Module V1.Process
Execute external programs.
val run : t -> ?dir:string -> ?env:string list -> string -> string list -> resultrun t prog argsrunsprogwith argumentsargsand returns its exit status together with the content of stdout and stderr. The action is logged.- parameter dir
change to
dirbefore running the command.
- parameter env
specify additional environment variables as a list of the form NAME=VALUE.
val run_capture_exn : t -> ?dir:string -> ?env:string list -> string -> string list -> stringrun_capture_exn t prog argssame asrun t prog argsbut returnsstdoutanddieif the error code is nonzero or there is some output onstderr.
val run_ok : t -> ?dir:string -> ?env:string list -> string -> string list -> boolrun_ok t prog argssame asrun t prog argsbut only cares whether the execution terminated successfully (i.e., returned an error code of0).