(repoPath: string)
| 173 | } |
| 174 | |
| 175 | export function ensureGitRepository(repoPath: string) { |
| 176 | if (!fs.existsSync(repoPath)) { |
| 177 | fs.mkdirSync(repoPath, { recursive: true }); |
| 178 | } |
| 179 | if (!fs.existsSync(path.join(repoPath, '.git'))) { |
| 180 | runGit(['init'], repoPath); |
| 181 | } |
| 182 | ensureGitignore(repoPath); |
| 183 | } |
no test coverage detected