MCPcopy Create free account
hub / github.com/driangle/taskmd / resolveRegisterPath

Function resolveRegisterPath

apps/cli/internal/cli/project_registry.go:75–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75func resolveRegisterPath() (string, error) {
76 p := projectRegisterPath
77 if p == "" {
78 cwd, err := os.Getwd()
79 if err != nil {
80 return "", fmt.Errorf("cannot determine current directory: %w", err)
81 }
82 p = cwd
83 }
84 abs, err := filepath.Abs(p)
85 if err != nil {
86 return "", fmt.Errorf("cannot resolve path: %w", err)
87 }
88 resolved, err := filepath.EvalSymlinks(abs)
89 if err != nil {
90 return "", fmt.Errorf("cannot resolve symlinks: %w", err)
91 }
92 return resolved, nil
93}
94
95func validateProjectDir(path string) error {
96 configFile := filepath.Join(path, configFilename)

Callers 1

runProjectRegisterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected