From c35e48291d1612b233d4d5feae734f1be081e55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Olsen?= Date: Mon, 13 Feb 2017 16:16:34 +0100 Subject: [PATCH] Fix correct number of arguments for key command --- src/cmds/restic/cmd_key.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmds/restic/cmd_key.go b/src/cmds/restic/cmd_key.go index 2fba516d9..7e51def40 100644 --- a/src/cmds/restic/cmd_key.go +++ b/src/cmds/restic/cmd_key.go @@ -120,7 +120,7 @@ func changePassword(gopts GlobalOptions, repo *repository.Repository) error { } func runKey(gopts GlobalOptions, args []string) error { - if len(args) < 1 || (args[0] == "rm" && len(args) != 2) { + if len(args) < 1 || (args[0] == "rm" && len(args) != 2) || (args[0] != "rm" && len(args) != 1) { return errors.Fatal("wrong number of arguments") }