Rename sharedMods to mods on migration

The place for storing mods was changed from sharedMods to mods when mod
management was implemented.  Rename the old sharedMods folder to mods
when the migration script is invoked.
This commit is contained in:
Hornwitser committed 2024-01-20 01:22:29 +01:00
1 parent adc2d9cb4d
commit 5e2221796a
1 file changed
+8
+8
View File
@@ -281,6 +281,14 @@ async function migrateRename(args) {
await migrateLogsDir(path.join("logs", "cluster-prerename"), path.join("logs", "cluster"));
}
if (
await fs.pathExists("sharedMods")
&& !await fs.pathExists("mods")
) {
logger.info("Moving sharedMods/ to mods/");
await fs.rename("sharedMods", "mods");
}
if (!args.dev) {
let pkg = JSON.parse(await fs.readFile("package.json"));
if (pkg.dependencies) {