MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / commandWithContext

Function commandWithContext

t/t.go:151–166  ·  view source on GitHub ↗
(ctx context.Context, args ...string)

Source from the content-addressed store, hash-verified

149}
150
151func commandWithContext(ctx context.Context, args ...string) *exec.Cmd {
152 cmd := exec.CommandContext(ctx, args[0], args[1:]...) //nolint:gosec
153 cmd.Stdout = os.Stdout
154 cmd.Stderr = os.Stderr
155 cmd.Env = os.Environ()
156 if *runCoverage {
157 cmd.Env = append(cmd.Env, "COVERAGE_OUTPUT=--test.coverprofile=coverage.out")
158 }
159 if runtime.GOARCH == "arm64" {
160 cmd.Env = append(cmd.Env, "MINIO_IMAGE_ARCH=RELEASE.2020-11-13T20-10-18Z-arm64")
161 cmd.Env = append(cmd.Env, "NFS_SERVER_IMAGE_ARCH=11-arm")
162 }
163 cmd.Env = append(cmd.Env, EnvForCompose()...)
164
165 return cmd
166}
167
168// command takes a list of args and executes them as a program.
169// Example:

Callers 2

commandFunction · 0.85
runTestsForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…