···66end
7788exception JJError of string * string
99+910module Make (Vars : Global_vars.Vars) = struct
1011 (** Makes a new process that has acess to all input and output
1112 This should be used for running other tui sub-programs *)
···3132 ~f:(fun x ->
3233 (match x.exit_status with
3334 | `Exited i ->
3434- if i == 0 then `Ok x.stdout else `BadExit (i, x.stderr)
3535+ if i == 0 then `Ok (x.stdout, x.stderr) else `BadExit (i, x.stderr)
3536 | `Signaled i ->
3637 `BadExit (i, x.stderr))
3738 |> Base.Or_error.return)
···7677 res
7778 ;;
78797979-8080 (** Run a jj command without outputting to the command_log.
8181 @param ?snapshot=true
8282 When true snapshots the state when running the command and also aquires a lock before running it. Set to false for commands you wish to run concurrently. like those for generating content in the UI
8383 @param ?color=true When true output will have terminal escape codes for color *)
8484- let jj_no_log ?(snapshot = true) ?(color = true) args =
8484+ let jj_no_log ?(get_stderr = false) ?(snapshot = true) ?(color = true) args =
8585 match jj_no_log_errorable ~snapshot ~color args with
8686 | Ok a ->
8787- a
8787+ if get_stderr then a |> snd else a |> fst
8888 | Error (`BadExit (code, str)) ->
8989 raise
9090 (JJError