From 8054651abef022bb07a6023f0c573a29e0ab1707 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 06:42:20 +0000 Subject: [PATCH] fix: keep Search.CVE.Enable nil while defaulting enabled behavior Agent-Logs-Url: https://github.com/project-zot/zot/sessions/f522f11f-2ac1-4e1f-928f-0a3ab51e3adf Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com> --- pkg/cli/server/root.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/cli/server/root.go b/pkg/cli/server/root.go index 4e1388aa..94f1f823 100644 --- a/pkg/cli/server/root.go +++ b/pkg/cli/server/root.go @@ -874,11 +874,7 @@ func applyDefaultValues(config *config.Config, viperInstance *viper.Viper, logge } if *config.Extensions.Search.Enable && config.Extensions.Search.CVE != nil { - if config.Extensions.Search.CVE.Enable == nil { - config.Extensions.Search.CVE.Enable = &defaultVal - } - - if *config.Extensions.Search.CVE.Enable { + if config.Extensions.Search.CVE.Enable == nil || *config.Extensions.Search.CVE.Enable { defaultUpdateInterval, _ := time.ParseDuration("2h") if config.Extensions.Search.CVE.UpdateInterval < defaultUpdateInterval {