private string QueryForMySqld() { var mysqld = Find.InPath("mysqld"); var shouldFindInPath = Platform.IsUnixy || Settings.Options.ForceFindMySqlInPath; if (shouldFindInPath && !(mysqld is null)) { return(mysqld); } if (Platform.IsWindows) { var servicePath = MySqlWindowsServiceFinder.FindPathToMySql(); // prefer the pathed mysqld, but fall back on service path if available var resolved = mysqld ?? servicePath; if (!(resolved is null)) { return(resolved); } } throw _noMySqlFoundException; }
private string QueryForMySqld() { if (Platform.IsUnixy || Settings.Options.ForceFindMySqlInPath) { var mysqlDaemonPath = Find.InPath("mysqld"); if (mysqlDaemonPath != null) { return(mysqlDaemonPath); } } if (Platform.IsWindows) { var path = MySqlWindowsServiceFinder.FindPathToMySql(); if (path != null) { return(path); } } throw _noMySqlFoundException; }