From 7dee179652d91ce944eccc2c3cf0a1938efab6b3 Mon Sep 17 00:00:00 2001 From: Sudarsan Reddy Date: Tue, 13 Dec 2022 11:03:00 +0000 Subject: [PATCH] TUN-7004: Dont show local config dirs for remotely configured tuns cloudflared shows possible directories for config files to be present if it doesn't see one when starting up. For remotely configured files, it may not be necessary to have a config file present. This PR looks to see if a token flag was provided, and if yes, does not log this message. --- cmd/cloudflared/tunnel/cmd.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/cloudflared/tunnel/cmd.go b/cmd/cloudflared/tunnel/cmd.go index 860fecf6..03ad6d49 100644 --- a/cmd/cloudflared/tunnel/cmd.go +++ b/cmd/cloudflared/tunnel/cmd.go @@ -241,7 +241,8 @@ func StartServer( listeners := gracenet.Net{} errC := make(chan error) - if config.GetConfiguration().Source() == "" { + // Only log for locally configured tunnels (Token is blank). + if config.GetConfiguration().Source() == "" && c.String(TunnelTokenFlag) == "" { log.Info().Msg(config.ErrNoConfigFile.Error()) }