Small refactoring to call Path.absolute one less time
This commit is contained in:
parent
46d74e1a96
commit
92b351de30
|
@ -149,11 +149,9 @@ 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"]
|
||||
(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
|
||||
|
||||
|
|
Loading…
Reference in New Issue