Process.addArgs

Add arguments to the process.

This could be used if you do not know all the arguments for program to run at single point, and you need to add it conditionally.

struct Process
void
addArgs
(
in string[] args...
)

Parameters

args string[]

array of arguments to add

Examples

auto program = Process("my-program")
    .withArgs("--some-option");

if (some condition)
    program.addArgs("--some-other-opt", "--verbose");

auto result = program
    .execute()
    .ensureStatus!MyException("My error message on failure");
writeln(result.output);

Meta