fix(api/config): allow YAML config with .yml (#1299)

This commit allow to use both `.yml` and `.yaml` extensions for YAML configuration files as
it is usually expected.
This commit is contained in:
Mathias 2023-11-17 22:47:30 +01:00 committed by GitHub
parent 8c5436cbed
commit 2f65671070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,7 +277,7 @@ func (cm *ConfigLoader) LoadConfigs(path string) error {
} }
for _, file := range files { for _, file := range files {
// Skip templates, YAML and .keep files // Skip templates, YAML and .keep files
if !strings.Contains(file.Name(), ".yaml") { if !strings.Contains(file.Name(), ".yaml") && !strings.Contains(file.Name(), ".yml") {
continue continue
} }
c, err := ReadConfig(filepath.Join(path, file.Name())) c, err := ReadConfig(filepath.Join(path, file.Name()))