From 92b351de305d8fa5055762d162c5e4569e7ce217 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 3 May 2018 21:28:32 +0700 Subject: [PATCH] Small refactoring to call Path.absolute one less time --- src/context.ml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/context.ml b/src/context.ml index 65602036..f8ac6f7f 100644 --- a/src/context.ml +++ b/src/context.ml @@ -149,12 +149,10 @@ let create ~(kind : Kind.t) ~path ~env ~name ~merlin ~targets ~profile () = the contents of the variable, but "ocamlfind printconf conf" still prints the configuration file set at the configuration time of ocamlfind, sigh... *) - match Env.get env "OCAMLFIND_CONF" with - | Some s -> Fiber.return (Path.absolute s) - | None -> - Process.run_capture_line ~env Strict - fn ["printconf"; "conf"] - >>| Path.absolute) + (match Env.get env "OCAMLFIND_CONF" with + | Some s -> Fiber.return s + | None -> Process.run_capture_line ~env Strict fn ["printconf"; "conf"]) + >>| Path.absolute) in let create_one ~name ~implicit ?findlib_toolchain ?host ~merlin () =