fix PATH separator for Windows

pull/12127/head
Steven Powell 2021-08-05 00:37:46 +00:00
parent 923455d7ca
commit f089c7f8e1
1 changed files with 5 additions and 1 deletions

View File

@ -81,7 +81,11 @@ func TestSkaffold(t *testing.T) {
}
oldPath := os.Getenv("PATH")
os.Setenv("PATH", fmt.Sprintf("%s:%s", filepath.Dir(abs), os.Getenv("PATH")))
pathSeparator := ":"
if runtime.GOOS == "windows" {
pathSeparator = ";"
}
os.Setenv("PATH", fmt.Sprintf("%s%s%s", filepath.Dir(abs), pathSeparator, os.Getenv("PATH")))
// make sure 'docker' and 'minikube' are now in PATH
for _, binary := range []string{"minikube", "docker"} {