mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
10
variables.go
10
variables.go
@@ -30,7 +30,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
|
||||
Status: r.ReplaceSlice(origTask.Status),
|
||||
Dir: r.Replace(origTask.Dir),
|
||||
Vars: nil,
|
||||
Env: r.ReplaceVars(origTask.Env),
|
||||
Env: nil,
|
||||
Silent: origTask.Silent,
|
||||
Method: r.Replace(origTask.Method),
|
||||
Prefix: r.Replace(origTask.Prefix),
|
||||
@@ -46,6 +46,14 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
|
||||
if new.Prefix == "" {
|
||||
new.Prefix = new.Task
|
||||
}
|
||||
|
||||
new.Env = make(taskfile.Vars, len(e.Taskfile.Env)+len(origTask.Env))
|
||||
for k, v := range r.ReplaceVars(e.Taskfile.Env) {
|
||||
new.Env[k] = v
|
||||
}
|
||||
for k, v := range r.ReplaceVars(origTask.Env) {
|
||||
new.Env[k] = v
|
||||
}
|
||||
for k, v := range new.Env {
|
||||
static, err := e.Compiler.HandleDynamicVar(v)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user