From 2967b6ca01ca005a09d45f98e1c2912781fc3cb7 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 7 May 2022 20:11:17 -0700 Subject: [PATCH] make sure that we set the config path when ReadConfig is called. --- webapp/backend/pkg/config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/backend/pkg/config/config.go b/webapp/backend/pkg/config/config.go index 88ab60e..14d26a3 100644 --- a/webapp/backend/pkg/config/config.go +++ b/webapp/backend/pkg/config/config.go @@ -75,6 +75,9 @@ func (c *configuration) Init() error { } func (c *configuration) ReadConfig(configFilePath string) error { + //make sure that we specify that this is the correct config path (for eventual WriteConfig() calls) + c.SetConfigFile(configFilePath) + configFilePath, err := utils.ExpandPath(configFilePath) if err != nil { return err @@ -104,8 +107,6 @@ func (c *configuration) ReadConfig(configFilePath string) error { if err != nil { return err } - //make sure that we specify that this is the correct config path (for eventual WriteConfig() calls) - c.SetConfigFile(configFilePath) return c.ValidateConfig() }