diff --git a/bin/promotion.ml b/bin/promotion.ml index 135fca96d59..d090a741135 100644 --- a/bin/promotion.ml +++ b/bin/promotion.ml @@ -116,7 +116,7 @@ module Files = struct List.sort present ~compare:(fun x y -> Path.Source.compare (Diff_promotion.File.source x) (Diff_promotion.File.source y)) |> List.iter ~f:(fun file -> - Diff_promotion.File.source file |> Path.Source.to_string |> Console.printf "%s") + Diff_promotion.File.source file |> Path.Source.to_string |> print_endline) ;; let command = Cmd.v info term diff --git a/doc/changes/fixed/13462.md b/doc/changes/fixed/13462.md new file mode 100644 index 00000000000..8a100bdd627 --- /dev/null +++ b/doc/changes/fixed/13462.md @@ -0,0 +1 @@ +- `$ dune promotion list` writes output to stdout rather than stderr (#13462) diff --git a/test/blackbox-tests/test-cases/promote/promotion-list.t b/test/blackbox-tests/test-cases/promote/promotion-list.t index 9ee01f35637..1a45b64d49d 100644 --- a/test/blackbox-tests/test-cases/promote/promotion-list.t +++ b/test/blackbox-tests/test-cases/promote/promotion-list.t @@ -40,13 +40,13 @@ +B actual [1] - $ dune promotion list --diff-command 'diff -u' 2>&1 + $ dune promotion list --diff-command 'diff -u' a.expected b.expected - $ dune promotion list b.expected --diff-command 'diff -u' 2>&1 + $ dune promotion list b.expected --diff-command 'diff -u' b.expected - $ dune promotion list a.expected nothing-to-promote.txt --diff-command 'diff -u' 2>&1 + $ dune promotion list a.expected nothing-to-promote.txt --diff-command 'diff -u' Warning: Nothing to promote for nothing-to-promote.txt. a.expected