mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Settings: Expand variables in configuration (#25075)
This commit is contained in:
@@ -125,7 +125,10 @@ func readConfig(configFile string) (*Config, error) {
|
||||
}
|
||||
|
||||
// interpolate full toml string (it can contain ENV variables)
|
||||
stringContent := setting.EvalEnvVarExpression(string(fileBytes))
|
||||
stringContent, err := setting.ExpandVar(string(fileBytes))
|
||||
if err != nil {
|
||||
return nil, errutil.Wrap("Failed to expand variables", err)
|
||||
}
|
||||
|
||||
_, err = toml.Decode(stringContent, result)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user