Skip to content

Commit

Permalink
refactor: hoist up [env_ocamlpath] up a scope (ocaml#8563)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Aug 31, 2023
1 parent 6296200 commit 704a212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dune_rules/context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ type instance =
}

let ocamlpath (kind : Kind.t) ~env ~findlib_toolchain =
let env_ocamlpath = Findlib_config.ocamlpath_of_env env in
match kind, findlib_toolchain with
| Default, None -> Option.value ~default:[] (Findlib_config.ocamlpath_of_env env)
| Default, None -> Option.value ~default:[] env_ocamlpath
| _, _ ->
let initial_ocamlpath = Findlib_config.ocamlpath_of_env Env.initial in
let env_ocamlpath = Findlib_config.ocamlpath_of_env env in
(* If we are not in the default context, we can only use the OCAMLPATH
variable if it is specific to this build context *)
(* CR-someday diml: maybe we should actually clear OCAMLPATH in other
Expand Down

0 comments on commit 704a212

Please sign in to comment.