(cwd)
| 1082 | } |
| 1083 | |
| 1084 | function isGitRepoRoot(cwd) { |
| 1085 | const gitDir = path.join(cwd, '.git') |
| 1086 | try { |
| 1087 | return fs.existsSync(gitDir) && fs.statSync(gitDir).isDirectory() |
| 1088 | } catch { |
| 1089 | return false |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | function ensureGitignoreLine(cwd, pattern) { |
| 1094 | const gitignorePath = path.join(cwd, '.gitignore') |
no outgoing calls
no test coverage detected