fix(config): do not attempt to parse config values from env when they contain an invalid data type
Related https://github.com/go-vikunja/vikunja/issues/719
This commit is contained in:
parent
7e8a4068df
commit
d7d277f9b6
|
|
@ -512,7 +512,13 @@ func setConfigFromEnv() error {
|
|||
}
|
||||
|
||||
// Move into the nested map
|
||||
currentMap = currentMap[part].(map[string]any)
|
||||
typed, is := currentMap[part].(map[string]any)
|
||||
if !is {
|
||||
log.Errorf("Failed to set config value from environment variable %s: %s, failed on part %s, type is not map, is %t", key, value, part, currentMap[part])
|
||||
continue
|
||||
}
|
||||
|
||||
currentMap = typed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue