executablePath method
Returns an executable binary path for executableName
.
Implementation
Future<String?> executablePath(String executableName,
{bool refresh = false}) async {
executableName = executableName.trim();
String? binPath;
if (!refresh) {
binPath = _whichExecutables[executableName];
if (binPath != null && binPath.isNotEmpty) {
return binPath;
}
}
binPath = await _whichExecutableImpl(executableName);
binPath ??= '';
_whichExecutables[executableName] = binPath;
log('INFO', 'executablePath($executableName): $binPath');
return binPath.isNotEmpty ? binPath : null;
}