runCommandWithOutput

fnCommandResult runCommandWithOutput(string[] args)

Execute an external command and capture stdout and stderr.

Note

In the current implementation, stderr is not captured separately.

Both stdout and stderr are combined into the output field.

Parameters

argsArray of command arguments, where args[0] is the program name.

Returns

CommandResult containing exit status, stdout, and stderr (combined).

Throws

Exception if the command cannot be spawned.