MCPcopy Create free account
hub / github.com/Shopify/goose / RunAndGetOutput

Method RunAndGetOutput

shell/supervisor.go:42–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42func (w *wrapper) RunAndGetOutput() ([]byte, []byte, error) {
43 stdout := &bytes.Buffer{}
44 stderr := &bytes.Buffer{}
45
46 cmd := w.cmd
47 cmd.Stdout = stdout
48 cmd.Stderr = stderr
49
50 err := w.Run()
51 return stdout.Bytes(), stderr.Bytes(), err
52}
53
54func (w *wrapper) Wait() (err error) {
55 defer metrics.ShellCommandRun.StartTimer(w.ctx).SuccessFinish(&err)

Callers

nothing calls this directly

Calls 2

RunMethod · 0.95
BytesMethod · 0.95

Tested by

no test coverage detected