Skip to content

Commit

Permalink
fix(install): respect display options
Browse files Browse the repository at this point in the history
<!-- ps-id: e2cecc12-1609-4398-97d1-1d56cdbcfd8d -->

Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter committed Feb 19, 2023
1 parent 4a9d0db commit 3d922f7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Unreleased
----------

- dune install now respects --display=quiet mode (#7116, fixes #7106, @Alizter)

3.7.0 (2023-02-17)
------------------

Expand Down
7 changes: 5 additions & 2 deletions bin/install_uninstall.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions test/blackbox-tests/test-cases/install/display.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Test installation display output

$ cat >dune-project <<EOF
> (lang dune 3.7)
> (package (name foo))
> EOF
$ cat >dune <<EOF
> (library
> (public_name foo))
> EOF

$ cat >foo.ml <<EOF
> let x = "foo"
> EOF

$ dune build @install

dune install should not output any "Installing" messages:

$ dune install --display=quiet --prefix prefix

0 comments on commit 3d922f7

Please sign in to comment.