MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / commandExists

Function commandExists

cmd/sqlc-test-setup/main.go:84–87  ·  view source on GitHub ↗

commandExists checks if a binary is available in PATH.

(name string)

Source from the content-addressed store, hash-verified

82
83// commandExists checks if a binary is available in PATH.
84func 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 ..."

Callers 1

installMySQLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected