run static method
Implementation
static Future<ProcessResult> run(
String cmd,
List<String> args, {
bool throwOnError = true,
String? workingDirectory,
bool printErrors = true,
}) async {
final result = await Process.run(
cmd,
args,
workingDirectory: workingDirectory,
runInShell: true,
);
if (printErrors) {
print(result.stderr);
print(result.stdout);
}
if (throwOnError) {
if (result.stderr != null) {
_throwIfProcessFailed(result, cmd, args);
}
}
return result;
}