MCPcopy Create free account
hub / github.com/google/gapid / Run

Method Run

core/os/shell/command.go:150–160  ·  view source on GitHub ↗

Run executes the command, and blocks until it completes or the context is cancelled.

(ctx context.Context)

Source from the content-addressed store, hash-verified

148
149// Run executes the command, and blocks until it completes or the context is cancelled.
150func (cmd Cmd) Run(ctx context.Context) error {
151 process, err := cmd.Start(ctx)
152 if err != nil {
153 return log.From(ctx).Err(err, "Failed to start process")
154 }
155 err = process.Wait(ctx)
156 if err != nil {
157 return log.From(ctx).Err(err, "Process returned error")
158 }
159 return nil
160}
161
162type muxedBuffer struct {
163 buf bytes.Buffer

Callers

nothing calls this directly

Calls 3

StartMethod · 0.95
WaitMethod · 0.65
ErrMethod · 0.45

Tested by

no test coverage detected