Skip to content

Commit adecd61

Browse files
authored
fix: dune promotion list should write its output to stdout (#13462)
Rather than stderr --------- Signed-off-by: Rudi Grinberg <[email protected]>
1 parent dc5b2b2 commit adecd61

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

bin/promotion.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module Files = struct
116116
List.sort present ~compare:(fun x y ->
117117
Path.Source.compare (Diff_promotion.File.source x) (Diff_promotion.File.source y))
118118
|> List.iter ~f:(fun file ->
119-
Diff_promotion.File.source file |> Path.Source.to_string |> Console.printf "%s")
119+
Diff_promotion.File.source file |> Path.Source.to_string |> print_endline)
120120
;;
121121

122122
let command = Cmd.v info term

doc/changes/fixed/13462.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `$ dune promotion list` writes output to stdout rather than stderr (#13462)

test/blackbox-tests/test-cases/promote/promotion-list.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
+B actual
4141
[1]
4242

43-
$ dune promotion list --diff-command 'diff -u' 2>&1
43+
$ dune promotion list --diff-command 'diff -u'
4444
a.expected
4545
b.expected
4646

47-
$ dune promotion list b.expected --diff-command 'diff -u' 2>&1
47+
$ dune promotion list b.expected --diff-command 'diff -u'
4848
b.expected
4949

50-
$ dune promotion list a.expected nothing-to-promote.txt --diff-command 'diff -u' 2>&1
50+
$ dune promotion list a.expected nothing-to-promote.txt --diff-command 'diff -u'
5151
Warning: Nothing to promote for nothing-to-promote.txt.
5252
a.expected

0 commit comments

Comments
 (0)