Skip to content

Commit

Permalink
Always use etcdctl v3 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dlipovetsky committed Sep 28, 2020
1 parent 1138060 commit fd4602a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions binary/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ func isEtcdctlInstalled(version, inputDir string) (bool, error) {
if !exists {
return false, nil
}
cmdVersionFlag := "--version"
if os.Getenv("ETCDCTL_API") == "3" {
cmdVersionFlag = "version"
}
cmd := exec.Command(path, cmdVersionFlag)
cmd := exec.Command(path, "version")
cmd.Env = append(os.Environ(), "ETCDCTL_API=3")
return util.CmdOutputContains(cmd, fmt.Sprintf("etcdctl version: %s", version))
}

Expand Down

0 comments on commit fd4602a

Please sign in to comment.