From cc875fd26848e74e4a70e9929c0e7e855a758970 Mon Sep 17 00:00:00 2001 From: Markus Thömmes Date: Wed, 13 Oct 2021 11:46:46 +0200 Subject: Display help text on empty subcommand by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Thömmes --- cmd/podman/validate/args.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/podman') diff --git a/cmd/podman/validate/args.go b/cmd/podman/validate/args.go index fc07a6acc..dde45cc29 100644 --- a/cmd/podman/validate/args.go +++ b/cmd/podman/validate/args.go @@ -27,7 +27,7 @@ func SubCommandExists(cmd *cobra.Command, args []string) error { } return errors.Errorf("unrecognized command `%[1]s %[2]s`\n\nDid you mean this?\n\t%[3]s\n\nTry '%[1]s --help' for more information.", cmd.CommandPath(), args[0], strings.Join(suggestions, "\n\t")) } - return errors.Errorf("missing command '%[1]s COMMAND'\nTry '%[1]s --help' for more information.", cmd.CommandPath()) + return cmd.Help() } // IDOrLatestArgs used to validate a nameOrId was provided or the "--latest" flag -- cgit v1.2.3-54-g00ecf