diff --git a/task.go b/task.go index 71c7644f..ce4d2d1d 100644 --- a/task.go +++ b/task.go @@ -143,6 +143,21 @@ func (e *Executor) Setup() error { return fmt.Errorf(`task: output option "%s" not recognized`, e.Taskfile.Output) } + if !version.IsV21(v) { + err := fmt.Errorf(`task: Taskfile option "ignore_error" is only available starting on Taskfile version v2.1`) + + for _, task := range e.Taskfile.Tasks { + if task.IgnoreError { + return err + } + for _, cmd := range task.Cmds { + if cmd.IgnoreError { + return err + } + } + } + } + e.taskCallCount = make(map[string]*int32, len(e.Taskfile.Tasks)) for k := range e.Taskfile.Tasks { e.taskCallCount[k] = new(int32)