From f9062ab473a4f4c8b6dd39a7b2a7bee11768770d Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Fri, 26 Mar 2021 14:45:35 -0500 Subject: [PATCH] TUN-4141: Better error messages for tunnel info subcommand. --- cmd/cloudflared/tunnel/subcommands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cloudflared/tunnel/subcommands.go b/cmd/cloudflared/tunnel/subcommands.go index a13d2167..2e92f116 100644 --- a/cmd/cloudflared/tunnel/subcommands.go +++ b/cmd/cloudflared/tunnel/subcommands.go @@ -368,8 +368,8 @@ func tunnelInfo(c *cli.Context) error { warningChecker := updater.StartWarningCheck(c) defer warningChecker.LogWarningIfAny(sc.log) - if c.NArg() > 1 { - return cliutil.UsageError(`"cloudflared tunnel info" accepts only one argument, the ID or name of the tunnel to run.`) + if c.NArg() != 1 { + return cliutil.UsageError(`"cloudflared tunnel info" accepts exactly one argument, the ID or name of the tunnel to get info about.`) } tunnelID, err := sc.findID(c.Args().First()) if err != nil {