1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00

fix: advanced import operates on including file instead of included file

This commit is contained in:
Pete Davison
2024-03-19 15:02:32 +00:00
parent 8f3180a9fa
commit e9448bd4be
6 changed files with 26 additions and 37 deletions

View File

@ -104,9 +104,9 @@ func (e *Executor) compiledTask(call *ast.Call, evaluateShVars bool) (*ast.Task,
}
new.Env = &ast.Vars{}
new.Env.Merge(templater.ReplaceVars(e.Taskfile.Env, cache))
new.Env.Merge(templater.ReplaceVars(dotenvEnvs, cache))
new.Env.Merge(templater.ReplaceVars(origTask.Env, cache))
new.Env.Merge(templater.ReplaceVars(e.Taskfile.Env, cache), nil)
new.Env.Merge(templater.ReplaceVars(dotenvEnvs, cache), nil)
new.Env.Merge(templater.ReplaceVars(origTask.Env, cache), nil)
if evaluateShVars {
err = new.Env.Range(func(k string, v ast.Var) error {
// If the variable is not dynamic, we can set it and return