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

fix: requires allowed values works with dynamic var (#2033)

This commit is contained in:
Valentin Maerten
2025-02-08 17:29:36 +01:00
committed by GitHub
parent 002b8c929a
commit 80f96d67da
4 changed files with 50 additions and 17 deletions

View File

@@ -185,6 +185,11 @@ func (e *Executor) RunTask(ctx context.Context, call *ast.Call) error {
if err != nil {
return err
}
if err := e.areTaskRequiredVarsAllowedValuesSet(t); err != nil {
return err
}
if !e.Watch && atomic.AddInt32(e.taskCallCount[t.Task], 1) >= MaximumTaskCall {
return &errors.TaskCalledTooManyTimesError{
TaskName: t.Task,