commandExists checks if a binary is available in PATH.
(name string)
| 82 | |
| 83 | // commandExists checks if a binary is available in PATH. |
| 84 | func commandExists(name string) bool { |
| 85 | _, err := exec.LookPath(name) |
| 86 | return err == nil |
| 87 | } |
| 88 | |
| 89 | // isMySQLVersionOK checks if the mysqld --version output indicates MySQL 9+. |
| 90 | // Example version string: "/usr/sbin/mysqld Ver 8.0.44-0ubuntu0.24.04.2 ..." |