diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index c7f40d11e..fc486e2cc 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -265,10 +265,23 @@ func BuildCLI(t *testing.T, cwd, coverDir string) string { } start := time.Now() - args := []string{"go", "build", "-mod", "vendor", "-o", execPath} + args := []string{ + "go", "build", + "-mod", "vendor", + "-o", execPath, + } + if coverDir != "" { args = append(args, "-cover") } + + if runtime.GOOS == "windows" { + // Get this error on my local Windows: + // error obtaining VCS status: exit status 128 + // Use -buildvcs=false to disable VCS stamping. + args = append(args, "-buildvcs=false") + } + cmd := exec.Command(args[0], args[1:]...) cmd.Dir = ".." out, err := cmd.CombinedOutput()