MCPcopy Index your code
hub / github.com/cli/cli / cmdOutput

Function cmdOutput

script/build.go:220–229  ·  view source on GitHub ↗
(args ...string)

Source from the content-addressed store, hash-verified

218}
219
220func cmdOutput(args ...string) (string, error) {
221 exe, err := safeexec.LookPath(args[0])
222 if err != nil {
223 return "", err
224 }
225 cmd := exec.Command(exe, args[1:]...)
226 cmd.Stderr = io.Discard
227 out, err := cmd.Output()
228 return strings.TrimSuffix(string(out), "\n"), err
229}
230
231func shellInspect(args []string) string {
232 fmtArgs := make([]string, len(args))

Callers 1

versionFunction · 0.85

Calls 2

CommandMethod · 0.80
OutputMethod · 0.65

Tested by

no test coverage detected