Skip to content

Commit

Permalink
etcdctl: fix get command error when no arg provided
Browse files Browse the repository at this point in the history
The current error is incorrect. Providing a similar one to the del
command.
  • Loading branch information
spzala committed Aug 19, 2018
1 parent 0a25f49 commit 7f001c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etcdctl/ctlv3/command/get_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func getCommandFunc(cmd *cobra.Command, args []string) {

func getGetOp(args []string) (string, []clientv3.OpOption) {
if len(args) == 0 {
ExitWithError(ExitBadArgs, fmt.Errorf("range command needs arguments."))
ExitWithError(ExitBadArgs, fmt.Errorf("get command needs one argument as key and an optional argument as range_end."))
}

if getPrefix && getFromKey {
Expand Down

0 comments on commit 7f001c1

Please sign in to comment.