From 22ee50e00592ae8e0c042c72bc28a02620cc0e91 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Mon, 14 Feb 2022 14:42:07 +0100 Subject: [PATCH] etcdctl: Fix target version not provided message --- etcdctl/ctlv3/command/downgrade_command.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etcdctl/ctlv3/command/downgrade_command.go b/etcdctl/ctlv3/command/downgrade_command.go index 55e95859c..039c70a55 100644 --- a/etcdctl/ctlv3/command/downgrade_command.go +++ b/etcdctl/ctlv3/command/downgrade_command.go @@ -16,6 +16,7 @@ package command import ( "errors" + "github.com/spf13/cobra" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/pkg/v3/cobrautl" @@ -79,7 +80,7 @@ func downgradeValidateCommandFunc(cmd *cobra.Command, args []string) { targetVersion := args[0] if len(targetVersion) == 0 { - cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("member peer urls not provided")) + cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("target version not provided")) } ctx, cancel := commandCtx(cmd) @@ -105,7 +106,7 @@ func downgradeEnableCommandFunc(cmd *cobra.Command, args []string) { targetVersion := args[0] if len(targetVersion) == 0 { - cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("member peer urls not provided")) + cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("target version not provided")) } ctx, cancel := commandCtx(cmd)