(execPath: string)
| 185 | } |
| 186 | |
| 187 | function gitBashCandidatesFromGitExecPath(execPath: string): readonly string[] { |
| 188 | const normalized = nodePath.win32.normalize(normalizeWindowsPath(execPath)); |
| 189 | const parts = normalized.split('\\'); |
| 190 | for (let i = parts.length - 1; i >= 0; i -= 1) { |
| 191 | const segment = parts[i]?.toLowerCase(); |
| 192 | if (segment === 'mingw32' || segment === 'mingw64') { |
| 193 | const root = parts.slice(0, i).join('\\'); |
| 194 | if (root.length > 0) { |
| 195 | return gitBashCandidatesFromGitRoot(root); |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | return gitBashCandidatesFromGitRoot(nodePath.win32.join(normalized, '..', '..')); |
| 201 | } |
| 202 | |
| 203 | function gitBashCandidatesFromGitRoot(root: string): readonly string[] { |
| 204 | return [ |
no test coverage detected