From 024f56682dcaaaae2dd990d6fae3b54c8d17c467 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 22 May 2017 13:09:35 +0100 Subject: middleware/chaos: fix version (#669) * middleware/chaos: fix version Move the version setting into a init function so it is done early. Then tweak the setup code for chaos a bit to correctly pick this version up. Add an integration test to pick this up in the toplevel test/ directory. Fixes #667 * Update tests --- coremain/run.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'coremain/run.go') diff --git a/coremain/run.go b/coremain/run.go index 2ae9d0b32..1c29b4be7 100644 --- a/coremain/run.go +++ b/coremain/run.go @@ -50,6 +50,9 @@ func init() { caddy.RegisterCaddyfileLoader("flag", caddy.LoaderFunc(confLoader)) caddy.SetDefaultCaddyfileLoader("default", caddy.LoaderFunc(defaultLoader)) + + caddy.AppName = coreName + caddy.AppVersion = coreVersion } // Run is CoreDNS's main() function. @@ -57,9 +60,6 @@ func Run() { flag.Parse() - caddy.AppName = coreName - caddy.AppVersion = coreVersion - // Set up process log before anything bad happens switch logfile { case "stdout": -- cgit v1.2.3