From 655ae98ced1efb6e67ae81b75fb8e33bfd2d0e80 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Thu, 5 Aug 2021 20:41:56 +1000 Subject: [PATCH] fix(notifier): regression in startup check (#2248) The changes in the koanf commit a7e867a699a77f0b9d564defd81094fd410e4404 introduced a regression in the startup procedure that prevented the option to disable the startup check from having an effect. This ensures the startup check is not performed if it is disabled as it was intended. --- internal/commands/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/commands/root.go b/internal/commands/root.go index 369e92a80..48fcb845d 100644 --- a/internal/commands/root.go +++ b/internal/commands/root.go @@ -127,7 +127,7 @@ func getProviders(config *schema.Configuration) (providers middlewares.Providers errors = append(errors, fmt.Errorf("unrecognized notifier provider")) } - if notifier != nil { + if notifier != nil && !config.Notifier.DisableStartupCheck { if _, err := notifier.StartupCheck(); err != nil { errors = append(errors, fmt.Errorf("failed to check notification provider: %w", err)) }