1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

fix(precondition): do not print error if context was aborted (#1338)

This commit is contained in:
Marcello Sylvester Bauer
2023-10-07 15:01:57 -07:00
committed by GitHub
parent 5168e54af7
commit d741dfe26d

View File

@@ -21,7 +21,9 @@ func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *taskfile.Task
Env: env.Get(t),
})
if err != nil {
e.Logger.Errf(logger.Magenta, "task: %s\n", p.Msg)
if !errors.Is(err, context.Canceled) {
e.Logger.Errf(logger.Magenta, "task: %s\n", p.Msg)
}
return false, ErrPreconditionFailed
}
}