Struct cradle::Env [−][src]
Expand description
Adds an environment variable to the environment of the child process.
use cradle::*; let StdoutUntrimmed(output) = cmd!("env", Env("FOO", "bar")); assert!(output.contains("FOO=bar\n"));
Child processes inherit the environment of the parent process.
Env
only adds environment variables to that inherited environment.
If the environment variable is also set in the parent process,
it is overwritten by Env
.