MCPcopy Index your code
hub / github.com/go-task/task / getRootNode

Method getRootNode

setup.go:56–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56func (e *Executor) getRootNode() (taskfile.Node, error) {
57 node, err := taskfile.NewRootNode(e.Entrypoint, e.Dir, e.Insecure, e.Timeout,
58 taskfile.WithCACert(e.CACert),
59 taskfile.WithCert(e.Cert),
60 taskfile.WithCertKey(e.CertKey),
61 )
62 var taskNotFoundError errors.TaskfileNotFoundError
63 if errors.As(err, &taskNotFoundError) {
64 taskNotFoundError.AskInit = true
65 return nil, taskNotFoundError
66 }
67 if err != nil {
68 return nil, err
69 }
70 e.Dir = node.Dir()
71 e.Entrypoint = node.Location()
72 return node, err
73}
74
75func (e *Executor) readTaskfile(node taskfile.Node) error {
76 ctx, cf := context.WithTimeout(context.Background(), e.Timeout)

Callers 1

SetupMethod · 0.95

Calls 7

NewRootNodeFunction · 0.92
WithCACertFunction · 0.92
WithCertFunction · 0.92
WithCertKeyFunction · 0.92
AsFunction · 0.92
DirMethod · 0.65
LocationMethod · 0.65

Tested by

no test coverage detected