From 62ee2d472bc7c679a4df4866058f9f3bdc1a09ff Mon Sep 17 00:00:00 2001 From: Aras Pranckevicius Date: Tue, 22 Jan 2019 11:10:52 +0200 Subject: [PATCH] Don't overwrite/produce structured log file if tundra is not actually doing a build (but just showing help/targets/includes) --- src/Driver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Driver.cpp b/src/Driver.cpp index b9066714..9c308f5c 100644 --- a/src/Driver.cpp +++ b/src/Driver.cpp @@ -339,7 +339,10 @@ bool DriverInitData(Driver* self) if (!DriverPrepareDag(self, s_DagFileName)) return false; - SetStructuredLogFileName(self->m_DagData->m_StructuredLogFileName); + // do not produce/overwrite structured log output file, + // if we're only reporting something and not doing an actual build + if (self->m_Options.m_IncludesOutput == nullptr && !self->m_Options.m_ShowHelp && !self->m_Options.m_ShowTargets) + SetStructuredLogFileName(self->m_DagData->m_StructuredLogFileName); DigestCacheInit(&self->m_DigestCache, MB(128), self->m_DagData->m_DigestCacheFileName);