pub fn create_env(policy: &ShellEnvironmentPolicy) -> HashMap<String, String>Expand description
Construct an environment map based on the rules in the specified policy. The
resulting map can be passed directly to Command::envs() after calling
env_clear() to ensure no unintended variables are leaked to the spawned
process.
The derivation follows the algorithm documented in the struct-level comment
for ShellEnvironmentPolicy.