Skip to content

Commit a48439d

Browse files
committed
Add global fields to instance data before executing template
This functionality was lost in 75594fa. Signed-off-by: Jan Dubois <[email protected]>
1 parent 21cbbfc commit a48439d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/store/instance.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ func PrintInstances(w io.Writer, instances []*Instance, format string) error {
276276
return fmt.Errorf("invalid go template: %w", err)
277277
}
278278
for _, instance := range instances {
279-
err = tmpl.Execute(w, instance)
279+
data, err := AddGlobalFields(instance)
280+
if err != nil {
281+
return err
282+
}
283+
err = tmpl.Execute(w, data)
280284
if err != nil {
281285
return err
282286
}

0 commit comments

Comments
 (0)