Skip to content

Commit

Permalink
recompute env dict on every command
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoRFS committed Jan 4, 2024
1 parent 6f405a2 commit b0665fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src-bindings/node/node.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module Process = struct

let set k v = Ojs.set_prop_ascii env k ([%js.of: string] v)

include [%js: val env : string Interop.Dict.t [@@js.global "process.env"]]
let env () = Interop.Dict.t_of_js [%js.to: string] env
end
end

Expand Down
2 changes: 1 addition & 1 deletion src-bindings/node/node.mli
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Process : sig

val set : string -> string -> unit

val env : string Interop.Dict.t
val env : unit -> string Interop.Dict.t
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/extension_instance.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ end = struct
in
Interop.Dict.union
(fun _k _v1 v2 -> Some v2)
Process.Env.env
(Process.Env.env ())
extra_env_vars
in
match command with
Expand Down

0 comments on commit b0665fc

Please sign in to comment.