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 {
  final parsedArgs = parse(args);
  if (parsedArgs['version'] == true) {
    print('sidekick: $version\nsidekick_core: ${core.version}');
    return;
  }
  return super.run(args);
}