From 70ecda6fd1ff85855881fe600402cd33e3adc850 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Tue, 27 Sep 2022 11:51:00 +0200 Subject: [PATCH] Fix warning on success --- app.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.go b/app.go index 9d21b58..3f43d7a 100644 --- a/app.go +++ b/app.go @@ -194,10 +194,12 @@ func NewHeadscale(cfg *Config) (*Headscale, error) { if cfg.OIDC.Issuer != "" { err = app.initOIDC() - if err != nil && cfg.OIDC.OnlyStartIfOIDCIsAvailable { - return nil, err - } else { - log.Warn().Err(err).Msg("failed to set up OIDC provider, falling back to CLI based authentication") + if err != nil { + if cfg.OIDC.OnlyStartIfOIDCIsAvailable { + return nil, err + } else { + log.Warn().Err(err).Msg("failed to set up OIDC provider, falling back to CLI based authentication") + } } }