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

Method mkdir

task.go:301–316  ·  view source on GitHub ↗
(t *ast.Task)

Source from the content-addressed store, hash-verified

299}
300
301func (e *Executor) mkdir(t *ast.Task) error {
302 if t.Dir == "" {
303 return nil
304 }
305
306 mutex := e.mkdirMutexMap[t.Task]
307 mutex.Lock()
308 defer mutex.Unlock()
309
310 if _, err := os.Stat(t.Dir); os.IsNotExist(err) {
311 if err := os.MkdirAll(t.Dir, 0o755); err != nil {
312 return err
313 }
314 }
315 return nil
316}
317
318func (e *Executor) runDeps(ctx context.Context, t *ast.Task) error {
319 g := &errgroup.Group{}

Callers 1

RunTaskMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected