mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
Fix panic for empty tasks
Closes #338 Closes #362 Co-authored-by: Bharath Kumar <shettybharath4@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user