chore: Add cleanup for existing Merico workflow directory
- Add safety check to remove existing workflow directory if present - Ensure clean installation by removing old files before copying - Prevent potential conflicts during version updates
This commit is contained in:
parent
6ac60e7b31
commit
cf4193c352
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user