From a98d2926ab80b7c7b4e43933fe9afb8bdc0946df Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Sat, 6 Aug 2022 12:06:06 +0300 Subject: [PATCH] fix: Disallow args for config-ssh subcommand in cli --- cli/configssh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/configssh.go b/cli/configssh.go index 6151b0a6d5323..08aeaf6c9d37a 100644 --- a/cli/configssh.go +++ b/cli/configssh.go @@ -156,7 +156,8 @@ func configSSH() *cobra.Command { Command: "coder config-ssh --dry-run", }, ), - RunE: func(cmd *cobra.Command, args []string) error { + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, _ []string) error { client, err := createClient(cmd) if err != nil { return err