run method

  1. @override
Future<int?> run(
  1. Iterable<String> args
)
override

Parses args and invokes Command.run on the chosen command.

This always returns a Future in case the command is asynchronous. The Future will throw a UsageException if args was invalid.

Implementation

@override
Future<int?> run(Iterable<String> args) async {
  final argResults = parse(args);

  if (argResults['verbose'] == true) {
    logger.level = Level.verbose;

    logger.detail('Verbose mode enabled');
  }

  logger.spaces(1);

  await _checkConfigs();

  await _checkForUpdates();

  logger.spaces();

  return runCommand(argResults);
}