1
0
mirror of https://github.com/go-task/task.git synced 2025-02-19 19:44:13 +02:00

fix: ignore empty dotfile file names

This commit is contained in:
Pete Davison 2022-09-08 18:51:39 +00:00
parent 160b788198
commit 44706f4957

View File

@ -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) {