From d0db1d73f95022b20c3d49dd015ae5fd3ff46592 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Fri, 17 Jan 2025 12:13:09 +0100 Subject: [PATCH] fix: Cleanup --- bundle/config/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundle/config/root.go b/bundle/config/root.go index 89c9b2233..c5e52ec2e 100644 --- a/bundle/config/root.go +++ b/bundle/config/root.go @@ -264,11 +264,12 @@ func (r *Root) InitializeVariables(vars []string) error { // Variables can have any type of value, including complex types func (r *Root) InitializeAnyTypeVariables(vars map[string]any) error { for name, val := range vars { - if _, ok := r.Variables[name]; !ok { + variable, ok := r.Variables[name] + if !ok { return fmt.Errorf("variable %s has not been defined", name) } - err := r.Variables[name].Set(val) + err := variable.Set(val) if err != nil { return fmt.Errorf("failed to assign %s to %s: %s", val, name, err) }