diff --git a/src/contributes/commands.ts b/src/contributes/commands.ts index 2dc2085..1f6788d 100644 --- a/src/contributes/commands.ts +++ b/src/contributes/commands.ts @@ -219,6 +219,9 @@ export function registerInstallCommandsCommand( let copiedDirectory = false; if (!fs.existsSync(sysMericoDirPath) || (updatePublicWorkflow === false && currentVersion !== previousVersion)) { logger.channel()?.debug("Creating directory: " + sysMericoDirPath); + if (fs.existsSync(sysMericoDirPath)) { + fs.rmSync(sysMericoDirPath, { recursive: true, force: true }); + } await copyDirectory(pluginDirPath, sysDirPath); copiedDirectory = true; }