From 37227c0d64f0518e79f16e1b8640af5e25510b4d Mon Sep 17 00:00:00 2001 From: Alpha DIALLO Date: Fri, 8 Mar 2024 15:20:20 +0100 Subject: [PATCH] fix: allow to override partially the setup config (#10229) Signed-off-by: Alpha DIALLO --- bin/install_uninstall.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/install_uninstall.ml b/bin/install_uninstall.ml index ae1af3444e6..1d22aa53942 100644 --- a/bin/install_uninstall.ml +++ b/bin/install_uninstall.ml @@ -39,8 +39,12 @@ let get_dirs context ~prefix_from_command_line ~from_command_line = match prefix_from_command_line with | None -> Memo.run (Context.roots context) | Some prefix -> + let setup_roots = + Roots.map ~f:(Option.map ~f:Path.of_string) Dune_rules.Setup.roots + in Roots.opam_from_prefix prefix ~relative:Path.relative |> Roots.map ~f:(fun s -> Some s) + |> Roots.first_has_priority setup_roots |> Fiber.return in let roots = Roots.first_has_priority from_command_line roots in