fix: handle skill scan failures for .claude gracefully

pull/6908/head
Aiden Cline 2026-01-04 21:39:45 -06:00
parent 8b3ae08a55
commit f2e65e40ea
1 changed files with 14 additions and 7 deletions

View File

@ -81,13 +81,20 @@ export namespace Skill {
}
for (const dir of claudeDirs) {
for await (const match of CLAUDE_SKILL_GLOB.scan({
cwd: dir,
absolute: true,
onlyFiles: true,
followSymlinks: true,
dot: true,
})) {
const matches = await Array.fromAsync(
CLAUDE_SKILL_GLOB.scan({
cwd: dir,
absolute: true,
onlyFiles: true,
followSymlinks: true,
dot: true,
}),
).catch((error) => {
log.error("failed .claude directory scan for skills", { dir, error })
return []
})
for (const match of matches) {
await addSkill(match)
}
}