1
0
mirror of https://github.com/go-task/task.git synced 2025-03-05 15:05:42 +02:00

suppress context errors when use watch option

This commit is contained in:
hatappi 2020-04-29 11:56:02 +09:00
parent 814f350b6d
commit bfc033959b

View File

@ -91,6 +91,10 @@ func (e *Executor) watchTasks(calls ...taskfile.Call) error {
} }
func isContextError(err error) bool { func isContextError(err error) bool {
if taskRunErr, ok := err.(*taskRunError); ok {
err = taskRunErr.err
}
return err == context.Canceled || err == context.DeadlineExceeded return err == context.Canceled || err == context.DeadlineExceeded
} }