runAsync function

Future<void> runAsync(
  1. String executable,
  2. List<String> arguments
)

Implementation

Future<void> runAsync(String executable, List<String> arguments) async {
  var process = await Process.start(executable, arguments);
  await process.stdout.pipe(stdout);
  await process.stderr.pipe(stderr);
  if (await process.exitCode != 0) {
    stdout.write('An error happened while running the command.');
    throw RuntimeException(executable: executable, arguments: arguments);
  }
}