Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh committed Aug 15, 2024
1 parent 9c44ee1 commit 5e536bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/exec/template_funcs_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ func componentFunc(cliConfig schema.CliConfiguration, component string, stack st
// If the result for the component in the stack already exists in the cache, return it
existingSections, found := componentFuncSyncMap.Load(stackSlug)
if found && existingSections != nil {

if cliConfig.Logs.Level == u.LogLevelTrace {
u.LogTrace(cliConfig, fmt.Sprintf("Found the result of the template function 'atmos.Component(%s, %s)' in the cache", component, stack))

if outputsSection, ok := existingSections.(map[string]any)["outputs"]; ok {
u.LogTrace(cliConfig, "'outputs' section:")
y, err2 := u.ConvertToYAML(outputsSection)
if err2 != nil {
u.LogError(err2)
} else {
u.LogTrace(cliConfig, y)
}
}
}

return existingSections, nil
}

Expand Down

0 comments on commit 5e536bb

Please sign in to comment.