Skip to content

Commit

Permalink
refactor(install): use Path.of_local (#10248)
Browse files Browse the repository at this point in the history
`append_local` creates source paths that look like `_build/install/...`.
While these are "correct", `Path.Source.is_in_build_dir` returns true
for these. In contrast, `Path.of_local` will detect the `_build` part
and make a build path.

Signed-off-by: Etienne Millon <[email protected]>
  • Loading branch information
emillon authored Mar 13, 2024
1 parent 5980dfd commit 481fa1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/install_uninstall.ml
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,7 @@ let run
let entries_per_package =
List.map install_files ~f:(fun (package, install_file) ->
let entries =
Install.Entry.load_install_file install_file (fun local ->
Path.append_local (Path.source Path.Source.root) local)
Install.Entry.load_install_file install_file Path.of_local
|> List.filter ~f:(fun (entry : Path.t Install.Entry.t) ->
Sections.should_install sections entry.section)
in
Expand Down

0 comments on commit 481fa1b

Please sign in to comment.