| 187 | } |
| 188 | |
| 189 | func (node *GitNode) ResolveEntrypoint(entrypoint string) (string, error) { |
| 190 | // If the file is remote, we don't need to resolve the path |
| 191 | if IsRemoteEntrypoint(entrypoint) { |
| 192 | return entrypoint, nil |
| 193 | } |
| 194 | |
| 195 | dir, _ := path.Split(node.path) |
| 196 | resolvedEntrypoint := fmt.Sprintf("%s//%s", node.url, path.Join(dir, entrypoint)) |
| 197 | if node.ref != "" { |
| 198 | return fmt.Sprintf("%s?ref=%s", resolvedEntrypoint, node.ref), nil |
| 199 | } |
| 200 | return resolvedEntrypoint, nil |
| 201 | } |
| 202 | |
| 203 | func (node *GitNode) ResolveDir(dir string) (string, error) { |
| 204 | path, err := execext.ExpandLiteral(dir) |