From a70c70f6f626e848b14e9b285133e3f890ba132a Mon Sep 17 00:00:00 2001 From: "d.small@sap.com" Date: Fri, 21 Nov 2025 01:39:48 +0000 Subject: [PATCH] Call yqinit in an init func to make sure the debug level gets set for module yqllib before yq gets used. Part of the fix for issue 773. NOTE: This will need a released version of ocm, one that has the YQInit func. Signed-off-by: d.small@sap.com --- controllers/spifftemplatedoc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/spifftemplatedoc.go b/controllers/spifftemplatedoc.go index 2dc3f551..d0121ac6 100644 --- a/controllers/spifftemplatedoc.go +++ b/controllers/spifftemplatedoc.go @@ -9,11 +9,16 @@ import ( "github.com/mikefarah/yq/v4/pkg/yqlib" "ocm.software/ocm/api/ocm/ocmutils/localize" ocmruntime "ocm.software/ocm/api/utils/runtime" + ocm_yqlib "ocm.software/ocm/api/utils/yqlib" ) // Key we store spiff rules under within spiff template doc. const ocmAdjustmentsTemplateKey = "ocmAdjustmentsTemplateKey" +func init() { + ocm_yqlib.InitYq() +} + // makeYqNode unmarshalls bytes into a CandidateNode // In order to make debugging easier later during yaml processing we take in // file name, document index and file index values which are then set on