collect

Runs the command, and also collects the standard output and standard error of the process into String objects. Note, if the command outputs lots of text, then you should NOT use this, as you will have a huge String object. Instead, use CommandRunner.run(Command, Consumer, Consumer).

Return

The CommandResult, from which you can get the exit status, stdout, stderr etc.


open fun collect(commandRunner: CommandRunner): CommandResult