()
| 73 | } |
| 74 | |
| 75 | func 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 | |
| 95 | func validateProjectDir(path string) error { |
| 96 | configFile := filepath.Join(path, configFilename) |
no outgoing calls
no test coverage detected