MCPcopy Create free account
hub / github.com/dagger/dagger / hostDaggerCommand

Function hostDaggerCommand

core/integration/module_test.go:8159–8166  ·  view source on GitHub ↗

command for a dagger cli call direct on the host

(ctx context.Context, t testing.TB, workdir string, args ...string)

Source from the content-addressed store, hash-verified

8157
8158// command for a dagger cli call direct on the host
8159func hostDaggerCommand(ctx context.Context, t testing.TB, workdir string, args ...string) *exec.Cmd {
8160 t.Helper()
8161 cmd := exec.Command(daggerCliPath(t), args...)
8162 cleanupExec(t, cmd)
8163 cmd.Env = append(os.Environ(), telemetry.PropagationEnv(ctx)...)
8164 cmd.Dir = workdir
8165 return cmd
8166}
8167
8168// runs a dagger cli command directly on the host, rather than in an exec
8169func hostDaggerExec(ctx context.Context, t testing.TB, workdir string, args ...string) ([]byte, error) {

Calls 3

daggerCliPathFunction · 0.85
cleanupExecFunction · 0.85
CommandMethod · 0.45

Tested by

no test coverage detected