mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Warn on instances with duplicated ids
It's possible that someone copies an instance folder and don't change the instance id in it. Emit a warning in case this happens.
This commit is contained in:
1 parent
bdfe8e630e
commit
a2a5cf6d4c
1 file changed
+5
@@ -886,6 +886,11 @@ async function discoverInstances(instancesDir) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (instanceInfos.has(instanceConfig.get("instance.id"))) {
|
||||
logger.warn(`Ignoring instance with duplicate id in folder ${entry.name}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
let instancePath = path.join(instancesDir, entry.name);
|
||||
logger.verbose(`found instance ${instanceConfig.get("instance.name")} in ${instancePath}`);
|
||||
instanceInfos.set(instanceConfig.get("instance.id"), {
|
||||
|
||||
Reference in new issue
Block a user