mirror of https://github.com/databricks/cli.git
acceptance: add -buildvcs=false when building on Windows (#2148)
I get an error on my local Windows otherwise: error obtaining VCS status: exit status 128 On CI this does not make a difference.
This commit is contained in:
parent
25f8ee8d66
commit
5592fa889e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue