Skip to content

Commit 7dee179

Browse files
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.
1 parent 78ca800 commit 7dee179

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/cloudflared/tunnel/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ func StartServer(
241241
listeners := gracenet.Net{}
242242
errC := make(chan error)
243243

244-
if config.GetConfiguration().Source() == "" {
244+
// Only log for locally configured tunnels (Token is blank).
245+
if config.GetConfiguration().Source() == "" && c.String(TunnelTokenFlag) == "" {
245246
log.Info().Msg(config.ErrNoConfigFile.Error())
246247
}
247248

0 commit comments

Comments
 (0)