From a84e65b7f95390e438c04eb86b594eca3671ed3a Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 13 Sep 2024 12:23:26 +0300 Subject: [PATCH] list: validate subcommand --- cmd/restic/cmd_list.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/restic/cmd_list.go b/cmd/restic/cmd_list.go index 6150f37a0..d66cddc4f 100644 --- a/cmd/restic/cmd_list.go +++ b/cmd/restic/cmd_list.go @@ -35,6 +35,7 @@ Exit status is 12 if the password is incorrect. return runList(cmd.Context(), globalOptions, args) }, ValidArgs: listAllowedArgs, + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), } func init() {