(projectRoot, statusPath)
| 38 | } |
| 39 | |
| 40 | function listUntrackedPath(projectRoot, statusPath) { |
| 41 | const fullPath = path.join(projectRoot, statusPath); |
| 42 | try { |
| 43 | const stat = fs.statSync(fullPath); |
| 44 | if (!stat.isDirectory()) return [statusPath]; |
| 45 | const found = []; |
| 46 | const walk = (dir) => { |
| 47 | for (const entry of fs.readdirSync(dir)) { |
| 48 | const entryPath = path.join(dir, entry); |
| 49 | const entryStat = fs.statSync(entryPath); |
| 50 | if (entryStat.isDirectory()) walk(entryPath); |
| 51 | else found.push(normalizePath(path.relative(projectRoot, entryPath))); |
| 52 | } |
| 53 | }; |
| 54 | walk(fullPath); |
| 55 | return found; |
| 56 | } catch { |
| 57 | return [statusPath]; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | function changedFilesFromGit(projectRoot) { |
| 62 | const dirty = [ |
no test coverage detected