mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
Merge global environment variables when merging tasks
This commit is contained in:
@@ -35,6 +35,13 @@ func Merge(t1, t2 *Taskfile, namespaces ...string) error {
|
|||||||
t1.Vars[k] = v
|
t1.Vars[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if t1.Env == nil {
|
||||||
|
t1.Env = make(Vars)
|
||||||
|
}
|
||||||
|
for k, v := range t2.Vars {
|
||||||
|
t1.Env[k] = v
|
||||||
|
}
|
||||||
|
|
||||||
if t1.Tasks == nil {
|
if t1.Tasks == nil {
|
||||||
t1.Tasks = make(Tasks)
|
t1.Tasks = make(Tasks)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user