From 364ddef56b82a7773868f89aab2f4ed41fe15335 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 24 Jul 2023 20:22:39 -0400 Subject: [PATCH] fix: add nil guards in dependency merge (#1263) --- taskfile/merge.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taskfile/merge.go b/taskfile/merge.go index 92a79c58..4bce9805 100644 --- a/taskfile/merge.go +++ b/taskfile/merge.go @@ -41,7 +41,9 @@ func Merge(t1, t2 *Taskfile, includedTaskfile *IncludedTaskfile, namespaces ...s // Add namespaces to dependencies, commands and aliases for _, dep := range task.Deps { - dep.Task = taskNameWithNamespace(dep.Task, namespaces...) + if dep != nil && dep.Task != "" { + dep.Task = taskNameWithNamespace(dep.Task, namespaces...) + } } for _, cmd := range task.Cmds { if cmd != nil && cmd.Task != "" {