runCliProcess function

Future<bool> runCliProcess(
  1. String executable,
  2. List<String> arguments
)

Implementation

Future<bool> runCliProcess(String executable, List<String> arguments) async {
  final result = await Process.run(
    executable,
    arguments,
    runInShell: true,
  );
  print('stdout of command: ${result.stdout}');
  if (result.exitCode != 0) {
    print('stderr of command: ${result.stderr}');
    return false;
  } else {
    return true;
  }
}