make sure we can correctly save the config file if onboarding influx.
This commit is contained in:
@@ -104,6 +104,8 @@ func (c *configuration) ReadConfig(configFilePath string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
//make sure that we specify that this is the correct config path (for eventual WriteConfig() calls)
|
||||||
|
c.SetConfigFile(configFilePath)
|
||||||
|
|
||||||
return c.ValidateConfig()
|
return c.ValidateConfig()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,8 +101,10 @@ func NewScrutinyRepository(appConfig config.Interface, globalLogger logrus.Field
|
|||||||
|
|
||||||
appConfig.Set("web.influxdb.token", *onboardingResponse.Auth.Token)
|
appConfig.Set("web.influxdb.token", *onboardingResponse.Auth.Token)
|
||||||
// we should write the config file out here. Ignore failures.
|
// 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
|
// Use blocking write client for writes to desired bucket
|
||||||
|
|||||||
Reference in New Issue
Block a user