Skip to content

Commit

Permalink
task: Check context error
Browse files Browse the repository at this point in the history
Check context error after running dependencies, to prevent false
positive preconditions errors due to "context canceled".

Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
  • Loading branch information
sylv-io committed Nov 3, 2021
1 parent 6a0b778 commit 6f3bf4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions task.go
Expand Up @@ -315,6 +315,10 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
}

if !e.Force {
if err := ctx.Err(); err != nil {
return err
}

preCondMet, err := e.areTaskPreconditionsMet(ctx, t)
if err != nil {
return err
Expand Down

0 comments on commit 6f3bf4a

Please sign in to comment.