mirror of
https://github.com/go-task/task.git
synced 2025-12-16 11:47:44 +01:00
feat: parse templates in collection-type variables (#1526)
* refactor: replacer * feat: move traverser to deepcopy package * feat: nested map variable templating * refactor: ReplaceVar function * feat: test cases * fix: TraverseStringsFunc copy value instead of pointer
This commit is contained in:
2
task.go
2
task.go
@@ -348,7 +348,7 @@ func (e *Executor) runCommand(ctx context.Context, t *ast.Task, call *ast.Call,
|
||||
outputWrapper = output.Interleaved{}
|
||||
}
|
||||
vars, err := e.Compiler.FastGetVariables(t, call)
|
||||
outputTemplater := &templater.Templater{Vars: vars}
|
||||
outputTemplater := &templater.Cache{Vars: vars}
|
||||
if err != nil {
|
||||
return fmt.Errorf("task: failed to get variables: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user