Allow for autodetecting both .yaml and .yml config files
This commit is contained in:
parent
c7d121b3d7
commit
4fad38207e
@ -275,3 +275,5 @@ dive will search for configs in the following locations:
|
|||||||
- `$XDG_CONFIG_DIRS/dive/*.yaml`
|
- `$XDG_CONFIG_DIRS/dive/*.yaml`
|
||||||
- `~/.config/dive/*.yaml`
|
- `~/.config/dive/*.yaml`
|
||||||
- `~/.dive.yaml`
|
- `~/.dive.yaml`
|
||||||
|
|
||||||
|
`.yml` can be used instead of `.yaml` if desired.
|
||||||
|
@ -205,7 +205,7 @@ func findInPath(pathTo string) string {
|
|||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
filename := file.Name()
|
filename := file.Name()
|
||||||
if path.Ext(filename) == ".yaml" {
|
if path.Ext(filename) == ".yaml" || path.Ext(filename) == ".yml" {
|
||||||
return path.Join(directory, filename)
|
return path.Join(directory, filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user