diff --git a/src/config.nim b/src/config.nim index 7b18d858..91036773 100644 --- a/src/config.nim +++ b/src/config.nim @@ -30,15 +30,8 @@ template getReportTemplate*(): ReportTemplate = let outconf = chalkConfig.outputConfigs[getBaseCommandName()] tmplName = outconf.report_template - actionId = "_ACTION_ID" - let templateRef = chalkConfig.reportTemplates[tmplName] - if actionId in templateRef.keys: - templateRef.keys[actionId].use = true - else: - templateRef.keys[actionId] = KeyConfig(use: true) - - templateRef + chalkConfig.reportTemplates[tmplName] template forceReportKeys*(keynames: openarray[string]) = let templateRef = getReportTemplate() diff --git a/src/reporting.nim b/src/reporting.nim index 3036f553..a363f9dd 100644 --- a/src/reporting.nim +++ b/src/reporting.nim @@ -133,11 +133,13 @@ proc doReporting*(topic="report") {.exportc, cdecl.} = if inSubscan(): let ctx = getCurrentCollectionCtx() ctx.report = doEmbeddedReport() + forceReportKeys(["_ACTION_ID"]) else: trace("Collecting runtime host info.") collectRunTimeHostInfo() trace("Generating command report.") let report = doCommandReport() + forceReportKeys(["_ACTION_ID"]) if report != "": safePublish(topic, report) doCustomReporting()