From 34618b7ae39c242b2bcab4b421effd0fe36ee79c Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 20 Dec 2013 18:28:47 +0100 Subject: [PATCH] Fixed default lookup path when project root can't be found --- src/indexOptions.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/indexOptions.ml b/src/indexOptions.ml index e5fd7a1..e1c2b87 100644 --- a/src/indexOptions.ml +++ b/src/indexOptions.ml @@ -265,10 +265,11 @@ let common_opts : t Term.t = let lib_info ocamllib (_root,build) (opens,full_opens) context = let dirs = match build with | None -> ocamllib - | Some d -> LibIndex.Misc.unique_subdirs (d :: ocamllib) + | Some d -> d :: ocamllib in if dirs = [] then failwith "Failed to guess OCaml / opam lib dirs. Please use `-I'"; + let dirs = LibIndex.Misc.unique_subdirs dirs in let info = LibIndex.load dirs in let info = List.fold_left (LibIndex.open_module ~cleanup_path:true) info opens