fix: copy skill subdirectories recursively (#175)
copyFileSync crashes with EISDIR when a skill contains subdirectories like scripts/. Skills support nested folders (scripts/, examples/, templates/) per the Claude Code spec. Use fs.cpSync to handle the complete skill structure.
This commit is contained in:
@@ -134,12 +134,7 @@ function buildVolumeMounts(
|
|||||||
const srcDir = path.join(skillsSrc, skillDir);
|
const srcDir = path.join(skillsSrc, skillDir);
|
||||||
if (!fs.statSync(srcDir).isDirectory()) continue;
|
if (!fs.statSync(srcDir).isDirectory()) continue;
|
||||||
const dstDir = path.join(skillsDst, skillDir);
|
const dstDir = path.join(skillsDst, skillDir);
|
||||||
fs.mkdirSync(dstDir, { recursive: true });
|
fs.cpSync(srcDir, dstDir, { recursive: true });
|
||||||
for (const file of fs.readdirSync(srcDir)) {
|
|
||||||
const srcFile = path.join(srcDir, file);
|
|
||||||
const dstFile = path.join(dstDir, file);
|
|
||||||
fs.copyFileSync(srcFile, dstFile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mounts.push({
|
mounts.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user