diff --git a/cmd/restic/cmd_restore.go b/cmd/restic/cmd_restore.go index 11eb13a23..2ffb4cda8 100644 --- a/cmd/restic/cmd_restore.go +++ b/cmd/restic/cmd_restore.go @@ -53,8 +53,11 @@ func init() { func runRestore(opts RestoreOptions, gopts GlobalOptions, args []string) error { ctx := gopts.ctx - if len(args) != 1 { + switch { + case len(args) == 0: return errors.Fatal("no snapshot ID specified") + case len(args) > 1: + return errors.Fatalf("more than one snapshot ID specified: %v", args) } if opts.Target == "" {