From 6a8c0524dda2ec2626dac815f0900f20b86a3f5d Mon Sep 17 00:00:00 2001 From: Arpit Jasapara Date: Fri, 19 Jan 2024 01:26:25 -0800 Subject: [PATCH] Change double negation to single check --- libs/template/config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/template/config.go b/libs/template/config.go index 71c9cd52d..bfb01d309 100644 --- a/libs/template/config.go +++ b/libs/template/config.go @@ -143,10 +143,9 @@ func (c *config) skipPrompt(p jsonschema.Property, r *renderer) (bool, error) { for _, properties := range p.Schema.SkipPromptIf.AnyOf { match := true for name, property := range properties.Properties { - if v, ok := c.values[name]; ok && v == property.Const { - continue + if v, ok := c.values[name]; !ok || v != property.Const { + match = false } - match = false } if match { allFalse = false