Skip to content

Commit

Permalink
Issue #999 Call WatchConfig in viper initialization
Browse files Browse the repository at this point in the history
Since we initialize viper in root.go and the daemon runs that only once, new
changes to the config on a different process or by running `crc config`
commands are not known to the daemon this should make daemon aware of changes
made to the config file, after it has been launched.
  • Loading branch information
anjannath authored and praveenkumar committed Feb 17, 2020
1 parent bfbac99 commit 51eaf6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/crc/config/viper_config.go
Expand Up @@ -101,6 +101,7 @@ func InitViper() error {
if err != nil {
return fmt.Errorf("Error reading configuration file '%s': %v", constants.ConfigFile, err)
}
v.WatchConfig()
globalViper = v
return v.Unmarshal(&changedConfigs)
}
Expand Down

0 comments on commit 51eaf6a

Please sign in to comment.