MCPcopy Create free account
hub / github.com/coder/envbox / CommandContext

Method CommandContext

xunix/xunixfake/exec.go:26–34  ·  view source on GitHub ↗
(_ context.Context, cmd string, args ...string)

Source from the content-addressed store, hash-verified

24}
25
26func (f *FakeExec) CommandContext(_ context.Context, cmd string, args ...string) xunix.Cmd {
27 // TODO: This isn't a great key because you may have multiple of the same commands
28 // but desire different output.
29 if c, ok := f.Commands[cmdKey(cmd, args...)]; ok {
30 c.Called = true
31 return c
32 }
33 return f.DefaultFakeCmd
34}
35
36func (f *FakeExec) AddCommands(cmds ...*FakeCmd) {
37 for _, cmd := range cmds {

Callers

nothing calls this directly

Calls 1

cmdKeyFunction · 0.85

Tested by

no test coverage detected