Fix panic for empty tasks

Closes #338
Closes #362

Co-authored-by: Bharath Kumar <shettybharath4@gmail.com>
This commit is contained in:
Andrey Nering
2020-10-12 21:03:13 -03:00
parent ce4ac97269
commit d78f78bb5c
4 changed files with 23 additions and 0 deletions

View File

@@ -119,6 +119,10 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
}
for name, task := range t.Tasks {
if task == nil {
task = &taskfile.Task{}
t.Tasks[name] = task
}
task.Task = name
}