fix(notifier): regression in startup check (#2248)

The changes in the koanf commit a7e867a699 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.
pull/2249/head
James Elliott 2021-08-05 20:41:56 +10:00 committed by GitHub
parent e930b76464
commit 655ae98ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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))
}