(node taskfile.Node)
| 73 | } |
| 74 | |
| 75 | func (e *Executor) readTaskfile(node taskfile.Node) error { |
| 76 | ctx, cf := context.WithTimeout(context.Background(), e.Timeout) |
| 77 | defer cf() |
| 78 | debugFunc := func(s string) { |
| 79 | e.Logger.VerboseOutf(logger.Magenta, s) |
| 80 | } |
| 81 | promptFunc := func(s string) error { |
| 82 | return e.Logger.Prompt(logger.Yellow, s, "n", "y", "yes") |
| 83 | } |
| 84 | reader := taskfile.NewReader( |
| 85 | taskfile.WithInsecure(e.Insecure), |
| 86 | taskfile.WithDownload(e.Download), |
| 87 | taskfile.WithOffline(e.Offline), |
| 88 | taskfile.WithTrustedHosts(e.TrustedHosts), |
| 89 | taskfile.WithTempDir(e.TempDir.Remote), |
| 90 | taskfile.WithCacheExpiryDuration(e.CacheExpiryDuration), |
| 91 | taskfile.WithReaderCACert(e.CACert), |
| 92 | taskfile.WithReaderCert(e.Cert), |
| 93 | taskfile.WithReaderCertKey(e.CertKey), |
| 94 | taskfile.WithDebugFunc(debugFunc), |
| 95 | taskfile.WithPromptFunc(promptFunc), |
| 96 | ) |
| 97 | graph, err := reader.Read(ctx, node) |
| 98 | if err != nil { |
| 99 | if errors.Is(err, context.DeadlineExceeded) { |
| 100 | return &errors.TaskfileNetworkTimeoutError{URI: node.Location(), Timeout: e.Timeout} |
| 101 | } |
| 102 | return err |
| 103 | } |
| 104 | if e.Taskfile, err = graph.Merge(); err != nil { |
| 105 | return err |
| 106 | } |
| 107 | return nil |
| 108 | } |
| 109 | |
| 110 | func (e *Executor) setupFuzzyModel() { |
| 111 | if e.Taskfile == nil { |
no test coverage detected