Skip to content

Commit b1fa1d5

Browse files
committed
fix: use the del() function to ignore a given path
1 parent 9a263e4 commit b1fa1d5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

deploy.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,16 @@ func (app *App) Deploy(ctx context.Context, opt *DeployOption) error {
128128
if err != nil {
129129
return fmt.Errorf("failed to parse ignore query: %w", err)
130130
}
131-
q = jsondiff.WithUpdate(q)
131+
// Use the del() function to ignore a given path
132+
q = &gojq.Query{
133+
Term: &gojq.Term{
134+
Type: gojq.TermTypeFunc,
135+
Func: &gojq.Func{
136+
Name: "del",
137+
Args: []*gojq.Query{q},
138+
},
139+
},
140+
}
132141
fnAny, _ := marshalAny(fn)
133142
fnAny, err = jsondiff.ModifyValue(q, fnAny)
134143
if err != nil {

0 commit comments

Comments
 (0)