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

Pass context as an argument

This commit is contained in:
Andrey Nering
2019-02-09 10:16:13 -02:00
parent 27b35157cd
commit 713ecd35f6
4 changed files with 28 additions and 34 deletions

View File

@ -10,13 +10,13 @@ import (
)
// Status returns an error if any the of given tasks is not up-to-date
func (e *Executor) Status(calls ...taskfile.Call) error {
func (e *Executor) Status(ctx context.Context, calls ...taskfile.Call) error {
for _, call := range calls {
t, err := e.CompiledTask(call)
if err != nil {
return err
}
isUpToDate, err := isTaskUpToDate(e.Context, t)
isUpToDate, err := isTaskUpToDate(ctx, t)
if err != nil {
return err
}