Small refactoring to call Path.absolute one less time
This commit is contained in:
parent
46d74e1a96
commit
92b351de30
|
@ -149,12 +149,10 @@ let create ~(kind : Kind.t) ~path ~env ~name ~merlin ~targets ~profile () =
|
||||||
the contents of the variable, but "ocamlfind printconf conf"
|
the contents of the variable, but "ocamlfind printconf conf"
|
||||||
still prints the configuration file set at the configuration
|
still prints the configuration file set at the configuration
|
||||||
time of ocamlfind, sigh... *)
|
time of ocamlfind, sigh... *)
|
||||||
match Env.get env "OCAMLFIND_CONF" with
|
(match Env.get env "OCAMLFIND_CONF" with
|
||||||
| Some s -> Fiber.return (Path.absolute s)
|
| Some s -> Fiber.return s
|
||||||
| None ->
|
| None -> Process.run_capture_line ~env Strict fn ["printconf"; "conf"])
|
||||||
Process.run_capture_line ~env Strict
|
>>| Path.absolute)
|
||||||
fn ["printconf"; "conf"]
|
|
||||||
>>| Path.absolute)
|
|
||||||
in
|
in
|
||||||
|
|
||||||
let create_one ~name ~implicit ?findlib_toolchain ?host ~merlin () =
|
let create_one ~name ~implicit ?findlib_toolchain ?host ~merlin () =
|
||||||
|
|
Loading…
Reference in New Issue