metrics: handle nil telemetry config (#601)

This commit is contained in:
Manav Darji 2022-11-26 01:54:50 +05:30 committed by GitHub
parent 095ce5e1da
commit 3e7160997a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,8 @@ func updateMetricsFromConfig(path string) {
conf := &CliConfig{} conf := &CliConfig{}
if _, err := toml.Decode(tomlData, &conf); err != nil || conf == nil { _, err = toml.Decode(tomlData, &conf)
if err != nil || conf == nil || conf.Telemetry == nil {
return return
} }