run method

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

Runs this command.

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

Implementation

@override
Future<int> run() async {
  try {
    await _generator.generate(recompile: recompile);
  } catch (e) {
    logger.err('Failed to generate the construct');
    return 1;
  }

  logger.write('\n');

  await _generator.run(constructRunnerArgs);

  return 0;
}