run method

  1. @override
Future<void> 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<void> run(Iterable<String> args) async {
  try {
    await super.run(args);
  } on UsageException catch (e) {
    print('${e.message}\n');
    print('${e.usage}\n');
    exit(64);
  } on ExitCommandException catch (e) {
    exit(e.signal);
  } catch (e, stack) {
    print('linting has exited unexpectedly: "$e" $stack');
    exit(1);
  }
}