Use docker binary find in path to fallback to Moby CLI

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
Guillaume Lours 2020-04-22 21:20:44 +02:00
parent 83e9843ef2
commit 8af8924a58
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ func init() {
if err != nil {
log.Fatal(err)
}
if err := os.Setenv("PATH", fmt.Sprintf("$PATH:%s", path)); err != nil {
if err := os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"),path)); err != nil {
panic(err)
}
}
@ -115,7 +115,7 @@ func main() {
}
func shellOutToDefaultEngine() {
cmd := exec.Command("/Applications/Docker.app/Contents/Resources/bin/docker", os.Args[1:]...)
cmd := exec.Command("docker", os.Args[1:]...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr