From 4fad38207edc78f0fa2a2799b20db2be25c589fc Mon Sep 17 00:00:00 2001 From: dosisod <39638017+dosisod@users.noreply.github.com> Date: Fri, 13 May 2022 23:33:31 -0700 Subject: [PATCH] Allow for autodetecting both .yaml and .yml config files --- README.md | 2 ++ cmd/root.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 941be82..15c45fe 100644 --- a/README.md +++ b/README.md @@ -275,3 +275,5 @@ dive will search for configs in the following locations: - `$XDG_CONFIG_DIRS/dive/*.yaml` - `~/.config/dive/*.yaml` - `~/.dive.yaml` + +`.yml` can be used instead of `.yaml` if desired. diff --git a/cmd/root.go b/cmd/root.go index 03086b1..f0c45b6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -205,7 +205,7 @@ func findInPath(pathTo string) string { for _, file := range files { filename := file.Name() - if path.Ext(filename) == ".yaml" { + if path.Ext(filename) == ".yaml" || path.Ext(filename) == ".yml" { return path.Join(directory, filename) } }