From f3a75f8d745c3950ce3a3bc90651f88a1afbdac8 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sat, 5 Feb 2022 10:01:06 -0700 Subject: [PATCH] improved handling of p []cue.Selector in for loop Signed-off-by: Richard Jones --- plan/task/decodesecret.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plan/task/decodesecret.go b/plan/task/decodesecret.go index 816661a7..c7e9906d 100644 --- a/plan/task/decodesecret.go +++ b/plan/task/decodesecret.go @@ -69,7 +69,9 @@ func (c *decodeSecretTask) Run(ctx context.Context, pctx *plancontext.Context, _ output.FillPath(path, secret.MarshalCUE()) case map[string]interface{}: for k, v := range entry { - convert(append(p, cue.ParsePath(k).Selectors()...), v) + np := append([]cue.Selector{}, p...) + np = append(np, cue.ParsePath(k).Selectors()...) + convert(np, v) } } }