diff --git a/CHANGES.md b/CHANGES.md index 83009da32d56..962d6a738540 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +Unreleased +---------- + +- dune install now respects --display=quiet mode (#7116, fixes #7106, @Alizter) + 3.7.0 (2023-02-17) ------------------ diff --git a/bin/install_uninstall.ml b/bin/install_uninstall.ml index 287bd161b13c..b2a2ec10e65c 100644 --- a/bin/install_uninstall.ml +++ b/bin/install_uninstall.ml @@ -718,8 +718,11 @@ let install_uninstall ~what = | true -> Ops.remove_dir_if_exists ~if_non_empty:Fail dst | false -> Ops.remove_file_if_exists dst); - print_line "%s %s" msg - (Path.to_string_maybe_quoted dst); + (match config.display.verbosity with + | Quiet -> () + | _ -> + print_line "%s %s" msg + (Path.to_string_maybe_quoted dst)); Ops.mkdir_p dir; let executable = Section.should_set_executable_bit entry.section diff --git a/test/blackbox-tests/test-cases/install/display.t b/test/blackbox-tests/test-cases/install/display.t new file mode 100644 index 000000000000..a61037e4c4fb --- /dev/null +++ b/test/blackbox-tests/test-cases/install/display.t @@ -0,0 +1,20 @@ +# Test installation display output + + $ cat >dune-project < (lang dune 3.7) + > (package (name foo)) + > EOF + $ cat >dune < (library + > (public_name foo)) + > EOF + + $ cat >foo.ml < let x = "foo" + > EOF + + $ dune build @install + +dune install should not output any "Installing" messages: + + $ dune install --display=quiet --prefix prefix