myRunGit function
Implementation
Future<ProcessResult> myRunGit(
List<String> args, {
bool throwOnError = true,
String? processWorkingDir,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) async {
final pr = await Process.run(
'git',
args,
workingDirectory: processWorkingDir,
runInShell: true,
stdoutEncoding: stdoutEncoding,
stderrEncoding: stderrEncoding,
);
if (throwOnError) {
_throwIfProcessFailed(pr, 'git', args);
}
return pr;
}