make sure that we set the config path when ReadConfig is called.

pull/222/head
Jason Kulatunga 2 years ago
parent 5ed69d7fc4
commit 2967b6ca01

@ -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()
}

Loading…
Cancel
Save