From bfc033959b14487c4f619beb59ed031f97375ca0 Mon Sep 17 00:00:00 2001 From: hatappi Date: Wed, 29 Apr 2020 11:56:02 +0900 Subject: [PATCH] suppress context errors when use watch option --- watch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/watch.go b/watch.go index 14eda036..0f0b6f87 100644 --- a/watch.go +++ b/watch.go @@ -91,6 +91,10 @@ func (e *Executor) watchTasks(calls ...taskfile.Call) error { } func isContextError(err error) bool { + if taskRunErr, ok := err.(*taskRunError); ok { + err = taskRunErr.err + } + return err == context.Canceled || err == context.DeadlineExceeded }