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

This commit is contained in:
Jason Kulatunga
2022-05-07 20:11:17 -07:00
parent 5ed69d7fc4
commit 2967b6ca01
+3 -2
View File
@@ -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()
}