run method

Future<int> run()

Runs the doctor command.

Implementation

Future<int> run() async {
  try {
    final info = await _gatherInfo();

    if (jsonOutput) {
      _printJson(info);
    } else {
      _printHumanReadable(info);
    }

    return 0;
  } catch (e) {
    printError('Error: $e');
    return 1;
  }
}