Skip to content

Commit

Permalink
fix: simplify flag & env
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Marais <[email protected]>
  • Loading branch information
maiste committed Jul 2, 2024
1 parent 881cd42 commit 989f7f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion bin/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -668,13 +668,15 @@ module Builder = struct
~docs
~doc:"Explain why Dune decides to re-digest some files")
and+ debug_package_logs =
let doc = "Always print the standard logs when building packages" in
Arg.(
value
& flag
& info
[ "debug-package-logs" ]
~docs
~doc:"Always print the standard logs when building packages")
~doc
~env:(Cmd.Env.info ~doc "DUNE_DEBUG_PACKAGE_LOGS"))
and+ no_buffer =
let doc =
"Do not buffer the output of commands executed by dune. By default dune buffers \
Expand Down
3 changes: 3 additions & 0 deletions doc/changes/10662.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- pkg: only logs the standard output when the command fails or the user explicitly requests it.
Add new flag `--debug-package-logs`, which force dune to display the stdout logs when dealing
with package management (#10662, @maiste)
4 changes: 0 additions & 4 deletions test/blackbox-tests/test-cases/pkg/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ dune="dune"
pkg_root="_build/_private/default/.pkg"

build_pkg() {
if [ $DUNE_DEBUG_PACKAGE_LOGS -eq 1 ] ; then
$dune build --debug-package-logs $pkg_root/$1/target/
else
$dune build $pkg_root/$1/target/
fi
}

show_pkg() {
Expand Down

0 comments on commit 989f7f7

Please sign in to comment.