File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -331,8 +331,11 @@ module Value_list_env = struct
331331 string (in the style of the PATH variable). *)
332332 type t = Value .t list Env.Map .t
333333
334- let parse_strings s = Bin. parse s |> List. map ~f: (fun s -> Value. String s)
335- let of_env env : t = Env. to_map env |> Env.Map. map ~f: parse_strings
334+ let global : t Lazy.t =
335+ let parse_strings s = Bin. parse s |> List. map ~f: (fun s -> Value. String s) in
336+ let of_env env : t = Env. to_map env |> Env.Map. map ~f: parse_strings in
337+ lazy (of_env (Global. env () ))
338+ ;;
336339
337340 (* Concatenate a list of values in the style of lists found in
338341 environment variables, such as PATH *)
@@ -575,7 +578,7 @@ module Pkg = struct
575578 for build actions to run successfully, such as $PATH on systems where the
576579 shell's default $PATH variable doesn't include the location of standard
577580 programs or build tools (e.g. NixOS). *)
578- Value_list_env. extend_concat_path (Value_list_env. of_env ( Global. env () ) ) package_env
581+ Value_list_env. extend_concat_path (Lazy. force Value_list_env. global ) package_env
579582 ;;
580583
581584 let exported_env t = Value_list_env. to_env @@ exported_value_env t
You can’t perform that action at this time.
0 commit comments