run method

  1. @override
void run()
override

Runs this command.

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

Implementation

@override
void run() async {
  try {
    if (!_validateInputs()) return;

    final config = _prepareConfiguration();
    await _executeCleanup(config);
    _reportSuccess();
  } catch (e) {
    StatusHelper.failed('Cleanup failed: ${e.toString()}',
        suggestion:
            'Check file permissions and ensure no processes are using the files',
        examples: ['sudo morpheme clean', 'morpheme doctor']);
  }
}