handleProcessResult static method
bool
handleProcessResult(
- ProcessResult result,
- Logger logger, [
- String indent = '',
- ProcessFinalizer? finalizer,
- String message = '',
Handles the child process results and outputs
Implementation
static bool handleProcessResult(
ProcessResult result,
Logger logger, [
String indent = '',
ProcessFinalizer? finalizer,
String message = '',
]) {
if (result.exitCode == 0) {
logger.printDone(message);
} else {
logger.printFailed('code ${result.exitCode}');
String logs = '''
Error:
${result.stderr.toString()}
Output:
${result.stdout.toString()}
''';
logger.printPassThru(logs, indent);
}
if (finalizer != null) finalizer(result.exitCode);
return result.exitCode == 0;
}