Skip to content

Commit

Permalink
Print to stderr when -o option omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
ctk21 committed Oct 16, 2019
1 parent 136f87c commit 6c51760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orun.ml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ let run output input cmdline =
in
let stats = `Assoc (stats @ extra_config) in
Sys.remove captured_stderr_filename ;
let oc = open_out output in
let oc = if output = "" then stderr else open_out output in
Yojson.Basic.to_channel oc stats ;
output_string oc "\n" ;
close_out oc ;
Expand All @@ -258,7 +258,7 @@ let run output input cmdline =
open Cmdliner

let output =
let doc = "Output location for run statistics" in
let doc = "Output location for run statistics file (if omitted then will print to stderr)" in
Arg.(value & opt string "" & info ["o"; "output"] ~docv:"FILE" ~doc)

let input =
Expand Down

0 comments on commit 6c51760

Please sign in to comment.