From: Bjørn Erik Pedersen Date: Fri, 26 Oct 2018 15:02:53 +0000 (+0200) Subject: commands: Truncate the error log on repeated config errors X-Git-Tag: v0.50~18 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1e9ac3dcc21e8f78d3f0a0ba4f35f6c142dfa6bc;p=brevno-suite%2Fhugo commands: Truncate the error log on repeated config errors --- diff --git a/commands/commandeer.go b/commands/commandeer.go index 3d4d0ff1..545191cf 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -227,6 +227,11 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error { c.DepsCfg = &deps.DepsCfg{} } + if c.logger != nil { + // Truncate the error log if this is a reload. + c.logger.Reset() + } + cfg := c.DepsCfg c.configured = false cfg.Running = running