Skip to content

Commit 5e536bb

Browse files
committed
updates
1 parent 9c44ee1 commit 5e536bb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

internal/exec/template_funcs_component.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ func componentFunc(cliConfig schema.CliConfiguration, component string, stack st
2424
// If the result for the component in the stack already exists in the cache, return it
2525
existingSections, found := componentFuncSyncMap.Load(stackSlug)
2626
if found && existingSections != nil {
27+
28+
if cliConfig.Logs.Level == u.LogLevelTrace {
29+
u.LogTrace(cliConfig, fmt.Sprintf("Found the result of the template function 'atmos.Component(%s, %s)' in the cache", component, stack))
30+
31+
if outputsSection, ok := existingSections.(map[string]any)["outputs"]; ok {
32+
u.LogTrace(cliConfig, "'outputs' section:")
33+
y, err2 := u.ConvertToYAML(outputsSection)
34+
if err2 != nil {
35+
u.LogError(err2)
36+
} else {
37+
u.LogTrace(cliConfig, y)
38+
}
39+
}
40+
}
41+
2742
return existingSections, nil
2843
}
2944

0 commit comments

Comments
 (0)