From c61d47722ebf1ee42681837675098bbff41628ad Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 4 Jan 2022 11:32:05 -0700 Subject: [PATCH] allowing --with to fill root object Signed-off-by: Richard Jones --- plan/plan.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plan/plan.go b/plan/plan.go index fe6e7581..39398ffd 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -38,15 +38,16 @@ func Load(ctx context.Context, withParams []string, args ...string) (*Plan, erro if len(withParams) > 0 { for i, param := range withParams { - log.Ctx(ctx).Debug().Interface("with", param).Msg("applying parameter") + log.Ctx(ctx).Debug().Interface("with", param).Msg("compiling parameter") paramV, err := compiler.Compile(fmt.Sprintf("with%v", i), param) if err != nil { return nil, err } - fillErr := v.FillPath(cue.ParsePath("inputs.params"), paramV) + log.Ctx(ctx).Debug().Interface("with", param).Msg("filling parameter") + fillErr := v.FillPath(cue.ParsePath(""), paramV) if fillErr != nil { - return nil, err + return nil, fillErr } } }