exec method

  1. @override
Future<WsExecResult> exec(
  1. String command, {
  2. String? cwd,
})
override

Runs command once and returns its captured output (used for git). cwd defaults to rootPath.

Implementation

@override
Future<WsExecResult> exec(String command, {String? cwd}) async {
  final r = await _client.execute(
    nodeId: _nodeId,
    command: command,
    cwd: cwd ?? rootPath,
    shellFamily: _shellFamily,
  );
  return WsExecResult(
    exitCode: r.exitCode,
    stdout: r.stdoutText,
    stderr: r.stderrText,
  );
}