mirror of
https://github.com/docker/compose.git
synced 2026-08-28 12:23:49 +00:00
Fix shell out to docker-classic when invoking
This commit is contained in:
parent
d876f9e779
commit
d2648da2d9
8 changed files with 26 additions and 70 deletions
|
|
@ -80,10 +80,17 @@ func dirContents(dir string) []string {
|
|||
}
|
||||
|
||||
func (s *Suite) linkClassicDocker() {
|
||||
p, err := exec.LookPath("docker")
|
||||
p, err := exec.LookPath("docker-classic")
|
||||
if err != nil {
|
||||
p, err = exec.LookPath("docker")
|
||||
}
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
err = os.Symlink(p, filepath.Join(s.BinDir, "docker-classic"))
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
dockerPath, err := filepath.Abs("../../bin/docker")
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
err = os.Symlink(dockerPath, filepath.Join(s.BinDir, "docker"))
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
err = os.Setenv("PATH", fmt.Sprintf("%s:%s", s.BinDir, os.Getenv("PATH")))
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
}
|
||||
|
|
@ -111,9 +118,9 @@ func (s *Suite) NewCommand(command string, args ...string) *CmdContext {
|
|||
|
||||
func dockerExecutable() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return "../../bin/docker.exe"
|
||||
return "docker.exe"
|
||||
}
|
||||
return "../../bin/docker"
|
||||
return "docker"
|
||||
}
|
||||
|
||||
// NewDockerCommand creates a docker builder.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue