Process.setEnv

Set the process' environment variables from the associative array received by the method. Returns a 'this' reference for chaining.

This also clears the copyEnv flag.

class Process
setEnv
(
const(char[])[char[]] env
)

Parameters

env const(char[])[char[]]

associative array of strings containing the environment variables for the process. The variable name should be the key used for each entry.

Return Value

Type: Process

A reference to this process object

Examples

char[][char[]] env;

env["MYVAR1"] = "first";
env["MYVAR2"] = "second";

p.setEnv(env).execute();

Meta