run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<bool> run() async {
final bool fix = args['fix'];
final List<String> tools = parent.globalTools;
List<bool> results = [];
for (var tool in tools) {
final closer = logger.printFixed('👀 Looking for $tool', inRs);
final exists = Utils.isCommand(tool);
if (!exists && fix) {
final res = Utils.installCommand(tool);
results.add(closer(res));
} else {
results.add(closer(exists));
}
}
final result = results.every((r) => r);
return result;
}