run method

  1. @override
FutureOr run()
override

Runs this command.

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

Implementation

@override
FutureOr run() async {
  if (argResults?.rest.isEmpty == true) {
    throw UsageException('value not passed for a module command', usage);
  } else {
    for (var pack in argResults!.rest) {
      final result = await find.call(pack).run();
      execute(result);
      break;
    }
  }
}