MCPcopy
hub / github.com/containers/toolbox / RunContext

Function RunContext

src/pkg/shell/shell.go:36–45  ·  view source on GitHub ↗
(ctx context.Context, name string, stdin io.Reader, stdout, stderr io.Writer, arg ...string)

Source from the content-addressed store, hash-verified

34}
35
36func RunContext(ctx context.Context, name string, stdin io.Reader, stdout, stderr io.Writer, arg ...string) error {
37 exitCode, err := RunContextWithExitCode(ctx, name, stdin, stdout, stderr, arg...)
38 if err != nil {
39 return err
40 }
41 if exitCode != 0 {
42 return fmt.Errorf("failed to invoke %s(1)", name)
43 }
44 return nil
45}
46
47func RunContextWithExitCode(ctx context.Context,
48 name string,

Callers 1

RunFunction · 0.85

Calls 1

RunContextWithExitCodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…