From 31769bcdf2ca113301cef0c9e0281964704db924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 31 Aug 2022 11:43:28 +0200 Subject: [PATCH] Manager: always set `config.currentGOOS` This variable is used in tests to mock the current OS, but wasn't set during normal operation of the Manager. This caused issues with the two-way variable system. --- internal/manager/config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/manager/config/config.go b/internal/manager/config/config.go index 23fdd1e7..d8f1cf07 100644 --- a/internal/manager/config/config.go +++ b/internal/manager/config/config.go @@ -174,6 +174,7 @@ func DefaultConfig(override ...func(c *Conf)) Conf { panic(fmt.Sprintf("unable to create copy of default config: %v", err)) } c.Meta.Version = latestConfigVersion + c.currentGOOS = VariablePlatform(runtime.GOOS) c.processAfterLoading(override...) return *c }