From 76020ca82d831c4d879ddfe86d6c3b04924f187a Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Tue, 30 Apr 2019 08:04:33 +0100 Subject: [PATCH] Do not fail when a findlib directory doesn't exist Fixes #2099 Signed-off-by: Jeremie Dimino --- CHANGES.md | 2 ++ src/findlib.ml | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 218d6d8811c..564527b00d3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,6 +32,8 @@ unreleased in the source. This allows the user to partially specify opam metadata in the the dune-project file. (#2017, @avsm, @jonludlam) +- Do not fail when a findlib directory doesn't exist (#2101, fix #2099, @diml) + 1.9.1 (11/04/2019) ------------------ diff --git a/src/findlib.ml b/src/findlib.ml index 896f969abf7..0e7d0db2055 100644 --- a/src/findlib.ml +++ b/src/findlib.ml @@ -439,6 +439,7 @@ let root_packages t = let pkgs = List.concat_map t.paths ~f:(fun dir -> match Path.readdir_unsorted dir with + | Error ENOENT -> [] | Error unix_error -> die "Unable to read directory %s for findlib package@.Reason:%s@."