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

Function runOutput

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

runOutput executes a command and returns its combined output.

(name string, args ...string)

Source from the content-addressed store, hash-verified

74
75// runOutput executes a command and returns its combined output.
76func runOutput(name string, args ...string) (string, error) {
77 log.Printf("exec: %s %s", name, strings.Join(args, " "))
78 cmd := exec.Command(name, args...)
79 out, err := cmd.CombinedOutput()
80 return string(out), err
81}
82
83// commandExists checks if a binary is available in PATH.
84func commandExists(name string) bool {

Callers 2

installPostgreSQLFunction · 0.85
installMySQLFunction · 0.85

Calls 1

JoinMethod · 0.45

Tested by

no test coverage detected