runCmdWait static method
运行指令并等待执行完成
Implementation
static Future<ProcessResult> runCmdWait({
String? cmd,
ProcessRunner? runner,
String? workingDirectory,
bool runInShell = true,
Map<String, String>? environment,
}) async {
final mergedRunner = _parseRunner(cmd: cmd, runner: runner);
Logger.info(
'[Run CMD](${workingDirectory ?? PathUtil.cwd.path}) >>',
mergedRunner.toStringCmd(),
);
final process = await Process.run(
mergedRunner.executable,
mergedRunner.startArguments,
runInShell: runInShell,
workingDirectory: workingDirectory,
environment: environment,
);
return process;
}