mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 19:49:44 +00:00
Fix correct number of arguments for key command
This commit is contained in:
parent
511278b66a
commit
c35e48291d
@ -120,7 +120,7 @@ func changePassword(gopts GlobalOptions, repo *repository.Repository) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runKey(gopts GlobalOptions, args []string) 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")
|
return errors.Fatal("wrong number of arguments")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user