mirror of https://github.com/docker/compose.git
tests.e2e: Fix Windows tests
Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
parent
32510c9d39
commit
6e99119a4b
|
@ -259,8 +259,16 @@ func TestMissingExistingCLI(t *testing.T) {
|
||||||
err = CopyFile(filepath.Join(binDir, DockerExecutableName), filepath.Join(bin, DockerExecutableName))
|
err = CopyFile(filepath.Join(binDir, DockerExecutableName), filepath.Join(bin, DockerExecutableName))
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
|
env := []string{"PATH=" + bin}
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
env = append(env, "USERPROFILE="+home)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
env = append(env, "HOME="+home)
|
||||||
|
}
|
||||||
|
|
||||||
c := icmd.Cmd{
|
c := icmd.Cmd{
|
||||||
Env: []string{"HOME=" + home, "PATH=" + bin},
|
Env: env,
|
||||||
Command: []string{filepath.Join(bin, "docker")},
|
Command: []string{filepath.Join(bin, "docker")},
|
||||||
}
|
}
|
||||||
res := icmd.RunCmd(c)
|
res := icmd.RunCmd(c)
|
||||||
|
|
Loading…
Reference in New Issue