MCPcopy
hub / github.com/go-task/task / runDeps

Method runDeps

task.go:318–338  ·  view source on GitHub ↗
(ctx context.Context, t *ast.Task)

Source from the content-addressed store, hash-verified

316}
317
318func (e *Executor) runDeps(ctx context.Context, t *ast.Task) error {
319 g := &errgroup.Group{}
320 if e.Failfast || t.Failfast {
321 g, ctx = errgroup.WithContext(ctx)
322 }
323
324 reacquire := e.releaseConcurrencyLimit()
325 defer reacquire()
326
327 for _, d := range t.Deps {
328 g.Go(func() error {
329 err := e.RunTask(ctx, &Call{Task: d.Task, Vars: d.Vars, Silent: d.Silent, Indirect: true})
330 if err != nil {
331 return err
332 }
333 return nil
334 })
335 }
336
337 return g.Wait()
338}
339
340func (e *Executor) runDeferred(t *ast.Task, call *Call, i int, vars *ast.Vars, deferredExitCode *uint8) {
341 ctx, cancel := context.WithCancel(context.Background())

Callers 1

RunTaskMethod · 0.95

Calls 2

RunTaskMethod · 0.95

Tested by

no test coverage detected