text method

Returns the shells stdout with any trailing newline stripped. Will throw a ShellException if the shell process did not exit with 0 as the exit code.

Implementation

@override
Future<String> text() async {
  _stringResult ??= await _rawResult.then(_processResult);
  return _stringResult!.replaceAll(base.$.trailingNewLineExp, "");
}