run method

  1. @override
Future<bool> run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
Future<bool> run() async {
  final dirPath = targetDir;
  final baseName = path.basename(dirPath);
  logger.printFixed('🏃 Runner build $baseName', inRs);

  final dartArgs = [
    'run',
    'build_runner',
    'build',
    '--delete-conflicting-outputs'
  ];
  final result = Process.runSync('dart', dartArgs, workingDirectory: dirPath);

  return Utils.handleProcessResult(result, logger, inRs + inRs);
}