From f07742f3544b2d8483d64b0f4aca9eda2eea572a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 31 Dec 2025 17:43:15 +0000 Subject: [PATCH 1/2] dev Signed-off-by: Rudi Grinberg From 2b87ec98c4e358dcb898bd48860084a1477d11b0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 26 Jan 2026 23:22:40 +0000 Subject: [PATCH 2/2] fix: make $ dune promotion list write to stdout Signed-off-by: Rudi Grinberg --- bin/promotion.ml | 2 +- doc/changes/fixed/13462.md | 1 + test/blackbox-tests/test-cases/promote/promotion-list.t | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 doc/changes/fixed/13462.md 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