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

Method ResolveEntrypoint

taskfile/node_stdin.go:43–59  ·  view source on GitHub ↗
(entrypoint string)

Source from the content-addressed store, hash-verified

41}
42
43func (node *StdinNode) ResolveEntrypoint(entrypoint string) (string, error) {
44 // If the file is remote, we don't need to resolve the path
45 if IsRemoteEntrypoint(entrypoint) {
46 return entrypoint, nil
47 }
48
49 path, err := execext.ExpandLiteral(entrypoint)
50 if err != nil {
51 return "", err
52 }
53
54 if filepathext.IsAbs(path) {
55 return path, nil
56 }
57
58 return filepathext.SmartJoin(node.Dir(), path), nil
59}
60
61func (node *StdinNode) ResolveDir(dir string) (string, error) {
62 path, err := execext.ExpandLiteral(dir)

Callers

nothing calls this directly

Calls 5

ExpandLiteralFunction · 0.92
IsAbsFunction · 0.92
SmartJoinFunction · 0.92
IsRemoteEntrypointFunction · 0.85
DirMethod · 0.65

Tested by

no test coverage detected