Merge pull request #600 from devchat-ai/chore/cleanup-merico-workflow-dir
chore: Add cleanup for existing Merico workflow directory
This commit is contained in:
commit
53d764c184
@ -219,6 +219,9 @@ export function registerInstallCommandsCommand(
|
|||||||
let copiedDirectory = false;
|
let copiedDirectory = false;
|
||||||
if (!fs.existsSync(sysMericoDirPath) || (updatePublicWorkflow === false && currentVersion !== previousVersion)) {
|
if (!fs.existsSync(sysMericoDirPath) || (updatePublicWorkflow === false && currentVersion !== previousVersion)) {
|
||||||
logger.channel()?.debug("Creating directory: " + sysMericoDirPath);
|
logger.channel()?.debug("Creating directory: " + sysMericoDirPath);
|
||||||
|
if (fs.existsSync(sysMericoDirPath)) {
|
||||||
|
fs.rmSync(sysMericoDirPath, { recursive: true, force: true });
|
||||||
|
}
|
||||||
await copyDirectory(pluginDirPath, sysDirPath);
|
await copyDirectory(pluginDirPath, sysDirPath);
|
||||||
copiedDirectory = true;
|
copiedDirectory = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user