bestForAny method

Future<String> bestForAny({
  1. String to = 'install',
})

Determines the best installation method for any operating system.

The to parameter is the installation target.

Implementation

Future<String> bestForAny({String to = 'install'}) async {
  final methods = package.methods ?? [];

  if (methods.contains('any')) return '${to}_any';

  leave(message: 'No installation method found for "{@blue}$packageName{@end}".', exitCode: 1);
}