fix: remove stale dist plugin dirs

This commit is contained in:
Peter Steinberger
2026-03-16 02:10:28 +00:00
parent 7d2ddf70c1
commit 70a6d40d37
2 changed files with 28 additions and 21 deletions

View File

@@ -135,13 +135,6 @@ export function copyBundledPluginMetadata(params = {}) {
}
const sourcePluginDirs = new Set();
const removeGeneratedPluginArtifacts = (distPluginDir) => {
removeFileIfExists(path.join(distPluginDir, "openclaw.plugin.json"));
removeFileIfExists(path.join(distPluginDir, "package.json"));
removePathIfExists(path.join(distPluginDir, GENERATED_BUNDLED_SKILLS_DIR));
removePathIfExists(path.join(distPluginDir, "node_modules"));
};
for (const dirent of fs.readdirSync(extensionsRoot, { withFileTypes: true })) {
if (!dirent.isDirectory()) {
continue;
@@ -154,7 +147,7 @@ export function copyBundledPluginMetadata(params = {}) {
const distManifestPath = path.join(distPluginDir, "openclaw.plugin.json");
const distPackageJsonPath = path.join(distPluginDir, "package.json");
if (!fs.existsSync(manifestPath)) {
removeGeneratedPluginArtifacts(distPluginDir);
removePathIfExists(distPluginDir);
continue;
}
@@ -203,7 +196,7 @@ export function copyBundledPluginMetadata(params = {}) {
continue;
}
const distPluginDir = path.join(distExtensionsRoot, dirent.name);
removeGeneratedPluginArtifacts(distPluginDir);
removePathIfExists(distPluginDir);
}
}