From bc9bfa81b2ebcc7e238c392595089d8ed4d7ff4a Mon Sep 17 00:00:00 2001 From: Laurence Jones Date: Thu, 21 Dec 2023 12:27:34 +0000 Subject: [PATCH] [notifications] fix segfault because url is not loaded (#2679) --- cmd/crowdsec-cli/notifications.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/crowdsec-cli/notifications.go b/cmd/crowdsec-cli/notifications.go index 007a17c62..da436420d 100644 --- a/cmd/crowdsec-cli/notifications.go +++ b/cmd/crowdsec-cli/notifications.go @@ -57,6 +57,9 @@ func (cli cliNotifications) NewCommand() *cobra.Command { if err := require.LAPI(csConfig); err != nil { return err } + if err := csConfig.LoadAPIClient(); err != nil { + return fmt.Errorf("loading api client: %w", err) + } if err := require.Notifications(csConfig); err != nil { return err }