improved handling of p []cue.Selector in for loop

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2022-02-05 10:01:06 -07:00
parent 3ce41fedf1
commit f3a75f8d74
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C

View File

@ -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)
}
}
}