Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
MlFront_Core.EnvModsSourcepp ppf envmods is a pretty-printer of the environment modifications envmods.
show envmods is a pretty printing of the environment modifications envmods.
additions mods are the set of (name,value) environment additions.
Additions should always be processed before removals and path_prepends.
path_prepends mods are the list of (name,value) environment additions for PATH-like variables.
Each (name,value) pair should be prepended in order.
Additions should always be processed before path prepends.
Path prepends should always be processed before removals.
removals mods are the set of environment names that need to be removed.
Removals should always be processed after additions.
add name value mods adds the environment variable named name with the value value to the environment.
prepend_path name value mods prepends to the PATH-like environment variable name the value value.
On Windows the path environment variable will be separated by semicolons while Unix will be seperated by colons.
add_from_env_if_present ~win32 names env_bindings t adds the subset of (name,value) environment bindings from env_bindings whose names match names.
For the "Bos" package with its "OS.Cmd.run" family of command runners, you should use ~win32:Sys.win32 (Astring.String.Map bindings env).
For the same "OS.Cmd.run" in the dk coder, which does not have Astring, you should use ~win32:Sys.win32 (Bos.OSEnvMap.bindings env).
remove_names name mods removes the environment variable named name from the environment.
union a b is all the modifications from both b and a, with preference given to b when an environment variable addition is present in both b and a.
apply ~win32 mods env_bindings applies the modifications mods to the (name,value) environment bindings in env_bindings.
For the "Bos" package with its "OS.Cmd.run" family of command runners, you should use:
MlFront_Core.EnvMods.apply ~win32:Sys.win32 envmods
(Astring.String.Map.bindings env)
|> Astring.String.Map.of_listFor the same "OS.Cmd.run" in the dk coder, which does not have Astring, you should use:
MlFront_Core.EnvMods.apply ~win32:Sys.win32 envmods
(Tr1Bos_Std.Bos.OSEnvMap.bindings env_orig)
|> Tr1Stdlib_V414Base.List.to_seq |> Tr1Bos_Std.Bos.OSEnvMap.of_seq