1
0
mirror of https://github.com/go-task/task.git synced 2025-01-12 04:34:11 +02:00

fix: add nil guards in dependency merge (#1263)

This commit is contained in:
Evan 2023-07-24 20:22:39 -04:00 committed by GitHub
parent 3908c05d14
commit 364ddef56b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 != "" {