From d73c7c916230a78c0d38afc1b078388a252b309c Mon Sep 17 00:00:00 2001 From: nick <48932118+the-nurk@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:49:30 -0600 Subject: [PATCH] #fix : update patch.go to call PatchValue correctly PatchValue accepts (patch, val, ...), but was receiving (val, patch). this is predicated on `orig` being the data getting patched, and `patch` being the patch plan, (as if generated by diff). --- flow/tasks/st/patch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/tasks/st/patch.go b/flow/tasks/st/patch.go index c76354bdc..c5dd11d7c 100644 --- a/flow/tasks/st/patch.go +++ b/flow/tasks/st/patch.go @@ -21,9 +21,9 @@ func (T *Patch) Run(ctx *hofcontext.Context) (interface{}, error) { v := ctx.Value o := v.LookupPath(cue.ParsePath("orig")) - n := v.LookupPath(cue.ParsePath("patch")) + p := v.LookupPath(cue.ParsePath("patch")) - r, err := structural.PatchValue(o, n, nil) + r, err := structural.PatchValue(p, o, nil) if err != nil { return nil, err }