mirror of
https://github.com/go-task/task.git
synced 2026-06-28 23:24:25 +00:00
Allow ignore_error at task level
This commit is contained in:
6
task.go
6
task.go
@@ -182,6 +182,12 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
|
||||
if err2 := statusOnError(t); err2 != nil {
|
||||
e.Logger.VerboseErrf("task: error cleaning status on error: %v", err2)
|
||||
}
|
||||
|
||||
if _, ok := err.(interp.ExitCode); ok && t.IgnoreError {
|
||||
e.Logger.VerboseErrf("task: task error ignored: %v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
return &taskRunError{t.Task, err}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user