MCPcopy Create free account
hub / github.com/cortexproject/cortex / RunCommandWithTimeoutAndGetOutput

Function RunCommandWithTimeoutAndGetOutput

integration/e2e/util.go:38–44  ·  view source on GitHub ↗
(timeout time.Duration, name string, args ...string)

Source from the content-addressed store, hash-verified

36}
37
38func RunCommandWithTimeoutAndGetOutput(timeout time.Duration, name string, args ...string) ([]byte, error) {
39 ctx, cancel := context.WithTimeout(context.Background(), timeout)
40 defer cancel()
41
42 cmd := exec.CommandContext(ctx, name, args...)
43 return cmd.CombinedOutput()
44}
45
46func EmptyFlags() map[string]string {
47 return map[string]string{}

Callers 1

WaitForRunningMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected