1
0
mirror of https://github.com/go-task/task.git synced 2025-11-27 22:38:20 +02:00

fix: interpolate vars in defer (#2173)

This commit is contained in:
Valentin Maerten
2025-04-21 18:43:20 +02:00
committed by GitHub
parent 84cd4dfdad
commit 7169bf6434
3 changed files with 20 additions and 0 deletions

View File

@@ -1809,6 +1809,9 @@ task-1 ran successfully
`)
require.Error(t, e.Run(context.Background(), &task.Call{Task: "task-2"}))
assert.Contains(t, buff.String(), expectedOutputOrder)
buff.Reset()
require.NoError(t, e.Run(context.Background(), &task.Call{Task: "parent"}))
assert.Contains(t, buff.String(), "child task deferred value-from-parent")
}
func TestExitCodeZero(t *testing.T) {