fix: handle skill scan failures for .claude gracefully
This commit is contained in:
parent
8b3ae08a55
commit
f2e65e40ea
1 changed files with 14 additions and 7 deletions
|
|
@ -81,13 +81,20 @@ export namespace Skill {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const dir of claudeDirs) {
|
for (const dir of claudeDirs) {
|
||||||
for await (const match of CLAUDE_SKILL_GLOB.scan({
|
const matches = await Array.fromAsync(
|
||||||
cwd: dir,
|
CLAUDE_SKILL_GLOB.scan({
|
||||||
absolute: true,
|
cwd: dir,
|
||||||
onlyFiles: true,
|
absolute: true,
|
||||||
followSymlinks: true,
|
onlyFiles: true,
|
||||||
dot: 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)
|
await addSkill(match)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue