mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
fix: variables passed to included taskfile (#1533)
This commit is contained in:
parent
a425e2bb6c
commit
c0a0faf3d3
@ -129,10 +129,10 @@ func (c *Compiler) getVariables(t *ast.Task, call *ast.Call, evaluateShVars bool
|
||||
return nil, err
|
||||
}
|
||||
if t != nil {
|
||||
if err := t.IncludedTaskfileVars.Range(taskRangeFunc); err != nil {
|
||||
if err := t.IncludeVars.Range(rangeFunc); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := t.IncludeVars.Range(rangeFunc); err != nil {
|
||||
if err := t.IncludedTaskfileVars.Range(taskRangeFunc); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
@ -1785,7 +1785,7 @@ Hello bar
|
||||
`)
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "default"}))
|
||||
t.Log(buff.String())
|
||||
assert.Equal(t, strings.TrimSpace(buff.String()), expectedOutputOrder)
|
||||
assert.Equal(t, expectedOutputOrder, strings.TrimSpace(buff.String()))
|
||||
}
|
||||
|
||||
func TestErrorCode(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
RECEIVER: "world"
|
||||
RECEIVER: '{{ .RECEIVER | default "world" }}'
|
||||
|
||||
tasks:
|
||||
greet:
|
||||
|
Loading…
Reference in New Issue
Block a user