Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions bin/promotion.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ module Show = struct
List.iter present ~f:(fun file ->
let correction_file = Diff_promotion.File.correction_file file in
if Path.exists correction_file
then (
let contents = Io.read_file correction_file in
Console.printf "%s" contents)
then Io.read_file correction_file |> print_endline
else
User_warning.emit
[ Pp.textf
Expand All @@ -142,11 +140,12 @@ module Show = struct
let term =
let+ builder = Common.Builder.term
and+ files =
(* CR-someday rgrinberg: should we really allow more than one file? How
are users supposed to distinguish the output? *)
Arg.(value & pos_all Cmdliner.Arg.file [] & info [] ~docv:"FILE" ~doc:None)
in
let common, _config = Common.init builder in
let files_to_promote = files_to_promote ~common files in
(* CR-soon rgrinberg: remove pointless args *)
let db = Diff_promotion.load_db () in
let { Diff_promotion.present = _; missing } =
Diff_promotion.partition_db db files_to_promote
Expand Down
2 changes: 2 additions & 0 deletions doc/changes/fixed/13481.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Print `$ dune promotion show` output to stdout rather than stderr (#13481,
@rgrinberg)
Loading