MCPcopy Create free account
hub / github.com/go-git/go-git / executeOnPath

Function executeOnPath

repository_test.go:3322–3333  ·  view source on GitHub ↗
(path, cmd string)

Source from the content-addressed store, hash-verified

3320}
3321
3322func executeOnPath(path, cmd string) error {
3323 args := strings.Split(cmd, " ")
3324 c := exec.Command(args[0], args[1:]...)
3325 c.Dir = path
3326 c.Env = os.Environ()
3327
3328 buf := bytes.NewBuffer(nil)
3329 c.Stderr = buf
3330 c.Stdout = buf
3331
3332 return c.Run()
3333}
3334
3335func (s *RepositorySuite) TestBrokenMultipleShallowFetch(c *C) {
3336 r, _ := Init(memory.NewStorage(), nil)

Callers 1

ExecuteOnPathFunction · 0.85

Calls 1

CommandMethod · 0.65

Tested by

no test coverage detected