From 9934507d74c97bccb753b04873eb74652600b6ff Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 26 Feb 2019 12:28:35 -0700 Subject: Command-line input validation: reject unused args Several podman commands accept no subcommands. Some of those were not actually checking, though, which could lead to user confusion. Added validation where missing; and, refactored to minimize duplication. (Side note: I decided against using cobra.NoArgs because its error message, "unknown command", misleadingly implies that there are known ones). Also added validation to varlink Signed-off-by: Ed Santiago --- cmd/podman/system_renumber.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman/system_renumber.go') diff --git a/cmd/podman/system_renumber.go b/cmd/podman/system_renumber.go index c8ce628b1..31137b9f6 100644 --- a/cmd/podman/system_renumber.go +++ b/cmd/podman/system_renumber.go @@ -18,6 +18,7 @@ var ( _renumberCommand = &cobra.Command{ Use: "renumber", + Args: noSubArgs, Short: "Migrate lock numbers", Long: renumberDescription, RunE: func(cmd *cobra.Command, args []string) error { -- cgit v1.2.3-54-g00ecf