run method

  1. @override
Future<void> run()
override

Executes the clean command.

It retrieves the client ID from the command-line arguments and then calls the cleanupPartialClone function to remove the associated clone files.

Implementation

@override
Future<void> run() async {
  final clientId = argResults![ClonifyCommandOptions.clientId.name];

  try {
    await cleanupPartialClone(clientId);
  } catch (e) {
    throw CustomException(
      'Failed to clean up the clone for client ID "$clientId": $e',
    );
  }
}