1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

fix: increase max task calls limit from 100 to 1000

Closes #1321
Closes #1332
This commit is contained in:
Andrey Nering
2023-10-07 18:28:49 -03:00
parent adfb96b637
commit a70f5aafc2
2 changed files with 9 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ import (
const (
// MaximumTaskCall is the max number of times a task can be called.
// This exists to prevent infinite loops on cyclic dependencies
MaximumTaskCall = 100
MaximumTaskCall = 1000
)
func shouldPromptContinue(input string) bool {
@@ -173,7 +173,10 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
return err
}
if !e.Watch && atomic.AddInt32(e.taskCallCount[t.Task], 1) >= MaximumTaskCall {
return &errors.TaskCalledTooManyTimesError{TaskName: t.Task}
return &errors.TaskCalledTooManyTimesError{
TaskName: t.Task,
MaximumTaskCall: MaximumTaskCall,
}
}
release := e.acquireConcurrencyLimit()