Esempio n. 1
0
// 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
}
Esempio n. 2
0
// capture sets GOPATH.
func capture(r scm.ReadOnlyRepo, args ...string) (string, int, error) {
	return internal.Capture(r.Root(), []string{"GOPATH=" + r.GOPATH()}, args...)
}