isCommand static method
Checks if command
is executable on this system.
Implementation
static bool isCommand(String command) {
final result =
Process.runSync('command', ['-v', command], runInShell: true);
return result.exitCode == 0 && result.stdout.toString().trim().isNotEmpty;
}