mirror of
https://github.com/mudler/LocalAI.git
synced 2025-02-22 18:02:34 +00:00
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:
parent
8c5436cbed
commit
2f65671070
@ -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()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user