run method

void run(
  1. List<String> arguments
)

Runs the CLI with the provided arguments.

Implementation

void run(List<String> arguments) {
  final results = _parser.parse(arguments);
  handleGlobalFlags(results);

  if (results.command != null) {
    final commandName = results.command!.name;
    final command = _commands[commandName];
    if (command != null) {
      command.run(results.command!);
    }
  } else {
    GeneralResponses.printGeneralUsage(_commands);
  }
}