(dir)
| 126 | } |
| 127 | walk(dir); |
| 128 | return count; |
| 129 | } |
| 130 | |
| 131 | function isCitadelRepo(dir) { |
| 132 | // Refuse to run unharness against the Citadel plugin repo itself. |
| 133 | // Detect by presence of skills/ and hooks_src/ at the root. |
| 134 | return fs.existsSync(path.join(dir, 'hooks_src')) && |
| 135 | fs.existsSync(path.join(dir, 'skills')) && |
| 136 | fs.existsSync(path.join(dir, 'package.json')) && |
| 137 | JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')).name === 'citadel'; |
| 138 | } |