From 811de8b819e50b9a0f4a2411ff723f67813aa48b Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Tue, 7 May 2024 11:29:47 +0200 Subject: [PATCH] Fix bug when using tailscale config by file Signed-off-by: Manuel Buil --- pkg/cli/agent/agent.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cli/agent/agent.go b/pkg/cli/agent/agent.go index c82582a3ef09..7e43dd519d00 100644 --- a/pkg/cli/agent/agent.go +++ b/pkg/cli/agent/agent.go @@ -90,16 +90,16 @@ func Run(ctx *cli.Context) error { contextCtx := signals.SetupSignalContext() go cmds.WriteCoverage(contextCtx) - if cmds.AgentConfig.VPNAuthFile != "" { - cmds.AgentConfig.VPNAuth, err = util.ReadFile(cmds.AgentConfig.VPNAuthFile) + if cfg.VPNAuthFile != "" { + cfg.VPNAuth, err = util.ReadFile(cfg.VPNAuthFile) if err != nil { return err } } // Starts the VPN in the agent if config was set up - if cmds.AgentConfig.VPNAuth != "" { - err := vpn.StartVPN(cmds.AgentConfig.VPNAuth) + if cfg.VPNAuth != "" { + err := vpn.StartVPN(cfg.VPNAuth) if err != nil { return err }