(entrypoint string)
| 59 | } |
| 60 | |
| 61 | func (node *FileNode) ResolveEntrypoint(entrypoint string) (string, error) { |
| 62 | // If the file is remote, we don't need to resolve the path |
| 63 | if IsRemoteEntrypoint(entrypoint) { |
| 64 | return entrypoint, nil |
| 65 | } |
| 66 | |
| 67 | path, err := execext.ExpandLiteral(entrypoint) |
| 68 | if err != nil { |
| 69 | return "", err |
| 70 | } |
| 71 | |
| 72 | if filepathext.IsAbs(path) { |
| 73 | return path, nil |
| 74 | } |
| 75 | |
| 76 | // NOTE: Uses the directory of the entrypoint (Taskfile), not the current working directory |
| 77 | // This means that files are included relative to one another |
| 78 | entrypointDir := filepath.Dir(node.entrypoint) |
| 79 | return filepathext.SmartJoin(entrypointDir, path), nil |
| 80 | } |
| 81 | |
| 82 | func (node *FileNode) ResolveDir(dir string) (string, error) { |
| 83 | path, err := execext.ExpandLiteral(dir) |
nothing calls this directly
no test coverage detected