// Capture sets GOPATH and executes a subprocess. func (o *Options) Capture(r scm.ReadOnlyRepo, args ...string) (string, int, time.Duration, error) { o.LeaseRunToken() defer o.ReturnRunToken() start := time.Now() out, exitCode, err := internal.Capture(r.Root(), []string{"GOPATH=" + r.GOPATH()}, args...) return out, exitCode, time.Since(start), err }
// capture sets GOPATH. func capture(r scm.ReadOnlyRepo, args ...string) (string, int, error) { return internal.Capture(r.Root(), []string{"GOPATH=" + r.GOPATH()}, args...) }