fix: ignore "env" files which don't end in .env

This commit is contained in:
3wc 2021-10-01 11:36:09 +02:00
parent 10b15d65b4
commit 49781c7e3f
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ func getAllFilesInDirectory(directory string) ([]fs.FileInfo, error) {
for _, file := range files {
// Follow any symlinks
filePath := path.Join(directory, file.Name())
if filepath.Ext(strings.TrimSpace(filePath)) != ".env" {
continue
}
realPath, err := filepath.EvalSymlinks(filePath)
if err != nil {
logrus.Warningf("broken symlink in your abra config folders: '%s'", filePath)