Skip to content

Commit

Permalink
Output both stdout and stderr of a process on errors.
Browse files Browse the repository at this point in the history
Not all programs honor the stderr convention.
  • Loading branch information
dmbaturin committed Oct 6, 2019
1 parent bdadcea commit ec76553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let get_program_output ?(input=None) command env_array =
let res = Unix.close_process_full (std_out, std_in, std_err) in
match res with
| Unix.WEXITED 0 -> Ok output
| _ -> Error (Printf.sprintf "Failed to execute \"%s\": %s" command err)
| _ -> Error (Printf.sprintf "Failed to execute \"%s\": %s%s" command output err)

(** Exception-safe list tail function that assumes that empty list's
tail is an empty list. Used for breadcrumbs. *)
Expand Down

0 comments on commit ec76553

Please sign in to comment.