-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
When executing build_runner
we need to wait for a long time without knowing if it worked or not. We should switch the Process.run to this functions:
Future<void> _runProcess(String command, List<String> args) async {
print('\n $command ${args.join(' ')}\n');
final completer = Completer<void>();
final result = await Process.start(
command,
args,
mode: ProcessStartMode.detachedWithStdio,
);
print('======================================================================');
final subscription = result.stdout.listen((codeUnits) => stdout.write(utf8.decode(codeUnits)));
subscription.onDone(() {
print('======================================================================');
completer.complete();
});
subscription.onError((dynamic error) => completer.completeError('Failed to complete process run: $error'));
return completer.future;
}
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done