From 44706f49575a70dc84064bd62f0f10433058a262 Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Thu, 8 Sep 2022 18:51:39 +0000 Subject: [PATCH] fix: ignore empty dotfile file names --- taskfile/read/dotenv.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taskfile/read/dotenv.go b/taskfile/read/dotenv.go index 70b9dc1d..caed7b1c 100644 --- a/taskfile/read/dotenv.go +++ b/taskfile/read/dotenv.go @@ -27,6 +27,9 @@ func Dotenv(c compiler.Compiler, tf *taskfile.Taskfile, dir string) (*taskfile.V for _, dotEnvPath := range tf.Dotenv { dotEnvPath = tr.Replace(dotEnvPath) + if dotEnvPath == "" { + continue + } dotEnvPath = filepathext.SmartJoin(dir, dotEnvPath) if _, err := os.Stat(dotEnvPath); os.IsNotExist(err) {