From 83f1b213fa2570d3173855928a8ed344d881fdab Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 17 May 2017 14:53:39 -0300 Subject: [PATCH] Use context on status commands --- task.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/task.go b/task.go index 8e824f0e..497a4231 100644 --- a/task.go +++ b/task.go @@ -97,7 +97,7 @@ func RunTask(ctx context.Context, name string) error { } if !Force { - upToDate, err := t.isUpToDate() + upToDate, err := t.isUpToDate(ctx) if err != nil { return err } @@ -140,7 +140,7 @@ func (t *Task) runDeps(ctx context.Context) error { return nil } -func (t *Task) isUpToDate() (bool, error) { +func (t *Task) isUpToDate(ctx context.Context) (bool, error) { if len(t.Status) > 0 { environ, err := t.getEnviron() if err != nil { @@ -149,6 +149,7 @@ func (t *Task) isUpToDate() (bool, error) { for _, s := range t.Status { err = execext.RunCommand(&execext.RunCommandOptions{ + Context: ctx, Command: s, Dir: t.Dir, Env: environ,