From a27c4d5b15d653926f7f2a04075c816002806a91 Mon Sep 17 00:00:00 2001 From: Cerebrovinny Date: Fri, 22 Nov 2024 08:09:48 +0000 Subject: [PATCH] initialize stacks firt --- internal/exec/utils.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/exec/utils.go b/internal/exec/utils.go index e340c9343..051b020c5 100644 --- a/internal/exec/utils.go +++ b/internal/exec/utils.go @@ -171,6 +171,16 @@ func processCommandLineArgs( ) (schema.ConfigAndStacksInfo, error) { var configAndStacksInfo schema.ConfigAndStacksInfo + // Initialize all map fields + configAndStacksInfo.ComponentSection = make(map[string]any) + configAndStacksInfo.ComponentVarsSection = make(map[string]any) + configAndStacksInfo.ComponentSettingsSection = make(map[string]any) + configAndStacksInfo.ComponentOverridesSection = make(map[string]any) + configAndStacksInfo.ComponentProvidersSection = make(map[string]any) + configAndStacksInfo.ComponentEnvSection = make(map[string]any) + configAndStacksInfo.ComponentBackendSection = make(map[string]any) + configAndStacksInfo.ComponentMetadataSection = make(map[string]any) + cmd.DisableFlagParsing = false err := cmd.ParseFlags(args) @@ -274,8 +284,6 @@ func ProcessStacks( return configAndStacksInfo, errors.New(message) } - configAndStacksInfo.StackFromArg = configAndStacksInfo.Stack - stacksMap, rawStackConfigs, err := FindStacksMap(cliConfig, false) if err != nil { return configAndStacksInfo, err