tsnet: fix format string/argument mismatch in log output

Change-Id: Ia7291ea47a289baec6cc6013d63d2f248ae57d9e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/4236/head
Brad Fitzpatrick 3 years ago committed by Brad Fitzpatrick
parent 19f61607b6
commit bfb4a4d9e9

@ -239,11 +239,12 @@ func (s *Server) start() error {
if err != nil { if err != nil {
return fmt.Errorf("starting backend: %w", err) return fmt.Errorf("starting backend: %w", err)
} }
if lb.State() == ipn.NeedsLogin || envknob.Bool("TSNET_FORCE_LOGIN") { st := lb.State()
logf("LocalBackend state is %v; running StartLoginInteractive...") if st == ipn.NeedsLogin || envknob.Bool("TSNET_FORCE_LOGIN") {
logf("LocalBackend state is %v; running StartLoginInteractive...", st)
s.lb.StartLoginInteractive() s.lb.StartLoginInteractive()
} else if authKey != "" { } else if authKey != "" {
logf("TS_AUTHKEY is set; but state is %v. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to force use of authkey.") logf("TS_AUTHKEY is set; but state is %v. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to force use of authkey.", st)
} }
go s.printAuthURLLoop() go s.printAuthURLLoop()

Loading…
Cancel
Save