etcdctl: show warning if ETCDCTL_API is not set in v2 --help

FIXES #7385
This commit is contained in:
fanmin shi
2017-02-28 16:21:03 -08:00
parent d3aebbf0ce
commit f76ca01aed
2 changed files with 10 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func main() {
// unset apiEnv to avoid side-effect for future env and flag parsing.
os.Unsetenv(apiEnv)
if len(apiv) == 0 || apiv == "2" {
ctlv2.Start()
ctlv2.Start(apiv)
return
}