(projectRoot string)
| 92 | } |
| 93 | |
| 94 | func cleanProjectRoot(projectRoot string) string { |
| 95 | root := strings.TrimSpace(projectRoot) |
| 96 | if root == "" { |
| 97 | root = "." |
| 98 | } |
| 99 | abs, err := filepath.Abs(root) |
| 100 | if err != nil { |
| 101 | return filepath.Clean(root) |
| 102 | } |
| 103 | return filepath.Clean(abs) |
| 104 | } |
| 105 | |
| 106 | func dataDir() string { |
| 107 | if raw := strings.TrimSpace(os.Getenv(EnvDataDir)); raw != "" { |