MCPcopy Create free account
hub / github.com/dim-an/cod / NewCodCmd

Method NewCodCmd

test/lib.go:180–189  ·  view source on GitHub ↗
(args ...string)

Source from the content-addressed store, hash-verified

178}
179
180func (wb *Workbench) NewCodCmd(args ...string) exec.Cmd {
181 cmd := exec.Cmd{}
182 cmd.Path = wb.codBinary
183 cmd.Args = append([]string{"cod-test"}, args...)
184 cmd.Env = os.Environ()
185 cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_CONFIG_HOME=%v", wb.getConfigHome()))
186 cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_DATA_HOME=%v", wb.getDataHome()))
187
188 return cmd
189}
190
191func (wb *Workbench) getConfigHome() string {
192 return filepath.Join(wb.currentTestWorkDir, "config")

Callers 2

UncheckedRunCodCmdMethod · 0.95
TestDaemonSmokeFunction · 0.80

Calls 2

getConfigHomeMethod · 0.95
getDataHomeMethod · 0.95

Tested by 1

TestDaemonSmokeFunction · 0.64