diff --git a/webapp/backend/pkg/config/config.go b/webapp/backend/pkg/config/config.go index 31243e9..88ab60e 100644 --- a/webapp/backend/pkg/config/config.go +++ b/webapp/backend/pkg/config/config.go @@ -104,6 +104,8 @@ 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() } diff --git a/webapp/backend/pkg/database/scrutiny_repository.go b/webapp/backend/pkg/database/scrutiny_repository.go index c35923f..fb94f62 100644 --- a/webapp/backend/pkg/database/scrutiny_repository.go +++ b/webapp/backend/pkg/database/scrutiny_repository.go @@ -101,8 +101,10 @@ func NewScrutinyRepository(appConfig config.Interface, globalLogger logrus.Field appConfig.Set("web.influxdb.token", *onboardingResponse.Auth.Token) // we should write the config file out here. Ignore failures. - _ = appConfig.WriteConfig() - + err = appConfig.WriteConfig() + if err != nil { + globalLogger.Infof("ignoring error while writing influxdb info to config: %v", err) + } } // Use blocking write client for writes to desired bucket