( out: SkillRoot[], dir: string, source: SkillSource, isDir: (p: string) => Promise<boolean>, realpath: (p: string) => Promise<string>, )
| 327 | } |
| 328 | |
| 329 | async function pushExistingRoot( |
| 330 | out: SkillRoot[], |
| 331 | dir: string, |
| 332 | source: SkillSource, |
| 333 | isDir: (p: string) => Promise<boolean>, |
| 334 | realpath: (p: string) => Promise<string>, |
| 335 | ): Promise<boolean> { |
| 336 | if (!(await isDir(dir))) return false; |
| 337 | const resolved = await realpath(dir); |
| 338 | if (!out.some((root) => root.path === resolved)) out.push({ path: resolved, source }); |
| 339 | return true; |
| 340 | } |
| 341 | |
| 342 | async function pushProvidedRoot( |
| 343 | out: SkillRoot[], |
no test coverage detected