fix(config): handle yaml correctly on yml extension

This commit is contained in:
Jan De Dobbeleer 2022-03-14 12:41:39 +01:00 committed by Jan De Dobbeleer
parent b4c44ea8d1
commit dcc2080047

View file

@ -103,6 +103,9 @@ func loadConfig(env environment.Environment) *Config {
cfg.origin = configFile
cfg.format = strings.TrimPrefix(filepath.Ext(configFile), ".")
if cfg.format == "yml" {
cfg.format = YAML
}
config.AddDriver(yaml.Driver)
config.AddDriver(json.Driver)