isAvailable method

  1. @override
Future<bool> isAvailable(
  1. PluginConfig plugin,
  2. PluginCommandConfig command
)
override

Whether the underlying executable for plugin/command is installed.

Implementation

@override
Future<bool> isAvailable(
  PluginConfig plugin,
  PluginCommandConfig command,
) async {
  final check = command.availability ?? plugin.availability;
  if (check == null) {
    return _probe(command.command, const ['--version']);
  }
  return _probe(check.command, check.args);
}